CircularBufferEx

Ecng.Collections

CircularBuffer with additional features based on IOperator.

継承元: CircularBuffer<T>

実装: ICircularBufferEx<T>, ICircularBuffer<T>, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable

コンストラクター

CircularBufferEx
public CircularBufferEx(int capacity)
circularBufferEx = CircularBufferEx(capacity)

Initializes a new instance of the CircularBufferEx.

capacity
Capacity.

プロパティ

Capacity
public override int Capacity { get; set; }
value = circularBufferEx.Capacity
circularBufferEx.Capacity = value

Maximum capacity of the buffer.

Item
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

Max
public NullableEx<TItem> Max { get; private set; }
value = circularBufferEx.Max
circularBufferEx.Max = value

Max value.

Min
public NullableEx<TItem> Min { get; private set; }
value = circularBufferEx.Min
circularBufferEx.Min = value

Min value.

Operator
public IOperator<TItem> Operator { get; set; }
value = circularBufferEx.Operator
circularBufferEx.Operator = value

Operator for arithmetic operations.

Stats
public CircularBufferStats Stats { get; set; }
value = circularBufferEx.Stats
circularBufferEx.Stats = value

Specifies which statistics to calculate.

Sum
public TItem Sum { get; private set; }
value = circularBufferEx.Sum
circularBufferEx.Sum = value

Sum of all elements in buffer.

SumNoFirst
public TItem SumNoFirst { get; }
value = circularBufferEx.SumNoFirst

Sum of all elements in buffer without the first element.

メソッド

Clear
public override void Clear()
circularBufferEx.Clear()

Reset state.

PopBack
public override void PopBack()
circularBufferEx.PopBack()

Removes the element at the back of the buffer. Decreasing the Buffer size by 1.

PopFront
public override void PopFront()
circularBufferEx.PopFront()

Removes the element at the front of the buffer. Decreasing the Buffer size by 1.

PushBack
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
PushFront
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