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;
 }
 /// <summary>
 /// Copy the given interval of this stream to the destination.
 /// </summary>
 public abstract void CopyTo(Interval <TTime> sourceInterval, DenseSliceStream <TTime, TValue> destination);