NumericCircularBufferEx
CircularBuffer with additional features for numeric types. Uses INumber operators for calculations.
继承自: CircularBuffer<T>
实现: ICircularBufferEx<T>, ICircularBuffer<T>, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
构造函数
public NumericCircularBufferEx(int capacity)
numericCircularBufferEx = NumericCircularBufferEx(capacity)
Initializes a new instance of the NumericCircularBufferEx.
- capacity
- Capacity.
属性
public override int Capacity { get; set; }
value = numericCircularBufferEx.Capacity
numericCircularBufferEx.Capacity = value
Maximum capacity of the buffer.
public override TItem Item { get; set; }
value = numericCircularBufferEx.Item
numericCircularBufferEx.Item = value
Gets the IPoint at the specified index, which merges the X,Y and higher order values into a single point
public NullableEx<TItem> Max { get; private set; }
value = numericCircularBufferEx.Max
numericCircularBufferEx.Max = value
Max value.
public NullableEx<TItem> Min { get; private set; }
value = numericCircularBufferEx.Min
numericCircularBufferEx.Min = value
Min value.
public CircularBufferStats Stats { get; set; }
value = numericCircularBufferEx.Stats
numericCircularBufferEx.Stats = value
Specifies which statistics to calculate.
public TItem Sum { get; private set; }
value = numericCircularBufferEx.Sum
numericCircularBufferEx.Sum = value
Sum of all elements in buffer.
public TItem SumNoFirst { get; }
value = numericCircularBufferEx.SumNoFirst
Sum of all elements in buffer without the first element.
方法
public override void PopBack()
numericCircularBufferEx.PopBack()
Removes the element at the back of the buffer. Decreasing the Buffer size by 1.
public override void PopFront()
numericCircularBufferEx.PopFront()
Removes the element at the front of the buffer. Decreasing the Buffer size by 1.
public override void PushBack(TItem item)
numericCircularBufferEx.PushBack(item)
Pushes a new element to the back of the buffer. Back()/this[Size-1] will now return this element. When the buffer is full, the element at Front()/this[0] will be popped to allow for this new element to fit.
- item
- Item to push to the back of the buffer
public override void PushFront(TItem item)
numericCircularBufferEx.PushFront(item)
Pushes a new element to the front of the buffer. Front()/this[0] will now return this element. When the buffer is full, the element at Back()/this[Size-1] will be popped to allow for this new element to fit.
- item
- Item to push to the front of the buffer