Crystal AI
1.0.0
|
A circular buffer https://en.wikipedia.org/wiki/Circular_buffer. More...
Public Member Functions | |
T | Enqueue (T item) |
Enqueue the specified item. More... | |
T | Dequeue () |
Dequeue this instance. More... | |
void | Clear () |
Clears the buffer. More... | |
int | IndexOf (T item) |
Returns the index of the first item equal to the query (item) if such an item exists within the buffer, -1 otherwise. More... | |
void | RemoveAt (int index) |
Removes the element at the given index. More... | |
IEnumerator< T > | GetEnumerator () |
Gets the enumerator. More... | |
CircularBuffer () | |
Initializes a new instance of the T:Crystal.CircularBuffer`1 class. More... | |
CircularBuffer (int size) | |
Initializes a new instance of the T:Crystal.CircularBuffer`1 class. More... | |
Properties | |
int | Count [get] |
Number of elements in the buffer. More... | |
int | Capacity [get, set] |
The maximum capacity of the buffer. More... | |
T | Head [get] |
Returns the value at the head of the buffer. More... | |
T | Tail [get] |
Returns the value at the tail of the buffer. More... | |
T | this[int index] [get, set] |
Gets or sets the T:Crystal.CircularBuffer`1 at the specified index. More... | |
Properties inherited from Crystal.ICircularBuffer< T > | |
int | Count [get] |
Number of elements in the buffer. More... | |
int | Capacity [get, set] |
The maximum capacity of the buffer. More... | |
T | Head [get] |
Returns the value at the head of the buffer. More... | |
T | Tail [get] |
Returns the value at the tail of the buffer. More... | |
T | this[int index] [get, set] |
Gets or sets the T:Crystal.ICircularBuffer`1 at the specified index. More... | |
A circular buffer https://en.wikipedia.org/wiki/Circular_buffer.
T |
|
inline |
Initializes a new instance of the T:Crystal.CircularBuffer`1 class.
|
inline |
Initializes a new instance of the T:Crystal.CircularBuffer`1 class.
size | Size. |
|
inline |
Clears the buffer.
Implements Crystal.ICircularBuffer< T >.
|
inline |
Dequeue this instance.
Implements Crystal.ICircularBuffer< T >.
|
inline |
|
inline |
Gets the enumerator.
|
inline |
Returns the index of the first item equal to the query (item) if such an item exists within the buffer, -1 otherwise.
Implements Crystal.ICircularBuffer< T >.
|
inline |
Removes the element at the given index.
index | Index. |
Implements Crystal.ICircularBuffer< T >.
|
getset |
The maximum capacity of the buffer.
The capacity.
|
get |
Number of elements in the buffer.
The count.
|
get |
Returns the value at the head of the buffer.
The head.
|
get |
Returns the value at the tail of the buffer.
The tail.
|
getset |
Gets or sets the T:Crystal.CircularBuffer`1 at the specified index.
index | Index. |