CircularBufferEx
CircularBuffer with additional features based on IOperator.
Erbt von: CircularBuffer<T>
Implementiert: ICircularBufferEx<T>, ICircularBuffer<T>, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
Konstruktoren
public CircularBufferEx(int capacity)
circularBufferEx = CircularBufferEx(capacity)
Initializes a new instance of the CircularBufferEx.
- capacity
- Capacity.
Eigenschaften
public override int Capacity { get; set; }
value = circularBufferEx.Capacity
circularBufferEx.Capacity = value
Maximum capacity of the buffer.
public override TItem Item { get; set; }
value = circularBufferEx.Item
circularBufferEx.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 = circularBufferEx.Max
circularBufferEx.Max = value
Max value.
public NullableEx<TItem> Min { get; private set; }
value = circularBufferEx.Min
circularBufferEx.Min = value
Min value.
public IOperator<TItem> Operator { get; set; }
value = circularBufferEx.Operator
circularBufferEx.Operator = value
Operator for arithmetic operations.
public CircularBufferStats Stats { get; set; }
value = circularBufferEx.Stats
circularBufferEx.Stats = value
Specifies which statistics to calculate.
public TItem Sum { get; private set; }
value = circularBufferEx.Sum
circularBufferEx.Sum = value
Sum of all elements in buffer.
public TItem SumNoFirst { get; }
value = circularBufferEx.SumNoFirst
Sum of all elements in buffer without the first element.
Methoden
public override void PopBack()
circularBufferEx.PopBack()
Removes the element at the back of the buffer. Decreasing the Buffer size by 1.
public override void PopFront()
circularBufferEx.PopFront()
Removes the element at the front of the buffer. Decreasing the Buffer size by 1.
public override void PushBack(TItem item)
circularBufferEx.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)
circularBufferEx.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