geomc 1.0
A c++ linear algebra template library
|
Array storage with templated static or dynamic size. If the array is dynamic, its length is stored internally and can be queried. More...
#include <geomc/Storage.h>
Public Member Functions | |
SizedStorage () | |
Construct a new SizedStorage of size N . (Static size only). | |
SizedStorage (index_t n) | |
Construct a new SizedStorage of size n . n is ignored if the array size is not dynamic. | |
index_t | size () const |
Return the number of elements in the array. | |
T * | get () |
Return a pointer to the first element in the storage array. | |
const T * | get () const |
Return a pointer to the first (const) element in the storage array. | |
T & | operator[] (index_t i) |
Return a reference to the i th element in the array. | |
T | operator[] (index_t i) const |
Return the i th element in the array. | |
Public Attributes | |
T | data [N] |
Data array. Reference-counted if N is 0 (dynamic). | |
Array storage with templated static or dynamic size. If the array is dynamic, its length is stored internally and can be queried.
T | Element type. |
N | Size of the array, or 0 for dynamic size. |
#include <geomc/Storage.h>