|
fennec
|
Data Structure that defines a compile-time allocated array. More...
#include <array.h>
| Property | Value |
|---|---|
| stable | ✅ |
| dynamic | ⛔ |
| homogenous | ✅ |
| distinct | ⛔ |
| ordered | ⛔ |
| space | \(O(N)\) |
| linear | ✅ |
| access | \(O(1)\) |
| find | \(O(N)\) |
| insertion | ⛔ |
| deletion | ⛔ |
| ValueT | value type |
| ElemV | number of elements |
Public Types | |
| using | value_t = ValueT |
Alias for ValueT | |
Public Member Functions | |
Properties | |
| constexpr size_t | size () const |
| returns the number of elements in the array | |
| constexpr bool_t | empty () const |
| returns true when the array is empty | |
Element Access | |
| constexpr value_t & | operator[] (size_t i) |
| constexpr const value_t & | operator[] (size_t i) const |
| access specified element | |
| constexpr value_t & | front () |
| Access the first element. | |
| constexpr const value_t & | front () const |
| Const Access the first element. | |
| constexpr value_t & | back () |
| Access the first element. | |
| constexpr const value_t & | back () const |
| Const Access the first element. | |
Iteration | |
| constexpr value_t * | begin () |
C++ Iterator Specification begin() | |
| constexpr value_t * | end () |
C++ Iterator Specification end() | |
| constexpr const value_t * | begin () const |
Const C++ Iterator Specification begin() | |
| constexpr const value_t * | end () const |
Const C++ Iterator Specification end() | |
Public Attributes | |
Public Members | |
| value_t | data [ElemV] |
| backing c-style array handle | |
Friends | |
Comparison Operators | |
| constexpr bool_t | operator== (const array &lhs, const array &rhs) |
| Checks if all elements in the arrays are equal. | |
| constexpr bool_t | operator!= (const array &lhs, const array &rhs) |
| Checks if any element in the arrays is not equal. | |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Returns a reference to the element at i
| i | index of the element to return |
|
inlineconstexpr |
Returns a reference to the element at i
| i | index of the element to return |
|
inlineconstexpr |
elements[0]
|
inlineconstexpr |
elements[0]
|
inlineconstexpr |
elements[ElemV - 1]
|
inlineconstexpr |
elements[ElemV - 1]
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |