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); } }
public SparseSliceStream( Time <TTime> initialTime, DenseSliceStream <Frame, TValue> innerStream, int maxBufferedFrameCount = 0) : base(initialTime, innerStream.SliverSize) { _innerStream = innerStream; _maxBufferedFrameCount = maxBufferedFrameCount; _tempBuffer = new TValue[SliverSize]; }
internal LoopingIntervalMapper(BufferedSliceStream <TTime, TValue> stream) { // Should only use this mapper on shut streams with a fixed ContinuousDuration. Debug.Assert(stream.IsShut); _stream = stream; }
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);