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);
     }
 }
예제 #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];
 }
예제 #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;
 }
예제 #4
0
 internal IdentityIntervalMapper(BufferedSliceStream <TTime, TValue> stream)
 {
     _stream = stream;
 }
예제 #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);