public override void CopyTo(Interval <TTime> sourceInterval, DenseSliceStream <TTime, TValue> destinationStream)
 {
     while (!sourceInterval.IsEmpty)
     {
         Slice <TTime, TValue> source = GetNextSliceAt(sourceInterval);
         destinationStream.Append(source);
         sourceInterval = sourceInterval.SubintervalStartingAt(source.Duration);
     }
 }
Exemplo n.º 2
0
 public SparseSliceStream(
     Time <TTime> initialTime,
     DenseSliceStream <Frame, TValue> innerStream,
     int maxBufferedFrameCount = 0)
     : base(initialTime, innerStream.SliverSize)
 {
     _innerStream           = innerStream;
     _maxBufferedFrameCount = maxBufferedFrameCount;
     _tempBuffer            = new TValue[SliverSize];
 }
Exemplo n.º 3
0
 internal LoopingIntervalMapper(BufferedSliceStream <TTime, TValue> stream)
 {
     // Should only use this mapper on shut streams with a fixed ContinuousDuration.
     Debug.Assert(stream.IsShut);
     _stream = stream;
 }
Exemplo n.º 4
0
 internal IdentityIntervalMapper(BufferedSliceStream <TTime, TValue> stream)
 {
     _stream = stream;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Copy the given interval of this stream to the destination.
 /// </summary>
 public abstract void CopyTo(Interval <TTime> sourceInterval, DenseSliceStream <TTime, TValue> destination);