Class for fixed-size vector storing N objects of type T. No resize or other STL functionality but (therefore) much less run-time overhead. More...
#include <fixed_size_vector.h>
Public Member Functions | |
| FixedSizeVector () | |
| Constructor; no initialisiation. | |
| FixedSizeVector (const T &value) | |
| Constructor with initialisation to value. | |
| FixedSizeVector (std::initializer_list< T > values) | |
| Constructor from initializer list. Allows FixedSizeVector<double,3> = {0.0,1.0,2.0}; say. | |
| void | fill (const T &value) |
| Fill all entries with specified value. | |
| unsigned | size () const |
| Size of vector. | |
| T & | operator[] (const unsigned &i) |
| Read/write access to i-th entry. | |
| const T & | operator[] (const unsigned &i) const |
| Read access to i-th entry. | |
Private Attributes | |
| T | Data [N] |
| The data, stored as a raw C-style array. | |
Class for fixed-size vector storing N objects of type T. No resize or other STL functionality but (therefore) much less run-time overhead.
Definition at line 47 of file fixed_size_vector.h.
|
inline |
Constructor; no initialisiation.
Definition at line 51 of file fixed_size_vector.h.
|
inline |
Constructor with initialisation to value.
Definition at line 54 of file fixed_size_vector.h.
References oomph::FixedSizeVector< T, N >::fill().
|
inline |
Constructor from initializer list. Allows FixedSizeVector<double,3> = {0.0,1.0,2.0}; say.
Definition at line 63 of file fixed_size_vector.h.
References i.
|
inline |
Fill all entries with specified value.
Definition at line 89 of file fixed_size_vector.h.
References i.
Referenced by oomph::FixedSizeVector< T, N >::FixedSizeVector().
|
inline |
|
inline |
|
inline |
Size of vector.
Definition at line 98 of file fixed_size_vector.h.
|
private |
The data, stored as a raw C-style array.
Definition at line 142 of file fixed_size_vector.h.