PushFront
method in Coherence.Interpolation
Methods
public void PushFront(Sample<T> sample)
Adds a new sample to the front of the buffer. If the buffer Capacity has already been reached, the oldest sample is removed. Samples should always be added with increasing timestamps. If multiple samples with identical timestamps are added, only the first sample is added and the rest are discarded. This ensures that buffer times are always incrementing.
Parameters
Type | Name | Description |
---|---|---|
Sample<T> | sample | The new sample to add to the buffer. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Throws an ArgumentException if the new sample time is older than the latest sample in the buffer. |