SHOGUN
v2.0.0
|
shogun n-dimensional array
Definition at line 22 of file SGNDArray.h.
Public Member Functions | |
SGNDArray () | |
SGNDArray (T *a, index_t *d, index_t nd, bool do_free_ndarray=false) | |
SGNDArray (index_t *d, index_t nd, bool do_free_ndarray=false) | |
SGNDArray (const SGNDArray &orig) | |
virtual | ~SGNDArray () |
virtual void | free_ndarray () |
virtual void | destroy_ndarray () |
T * | get_matrix (index_t matIdx) const |
const T & | operator[] (index_t index) const |
T & | operator[] (index_t index) |
void | transpose_matrix (index_t matIdx) const |
Public Attributes | |
T * | array |
index_t * | dims |
index_t | num_dims |
bool | do_free |
SGNDArray | ( | ) |
default constructor
Definition at line 26 of file SGNDArray.h.
constructor for setting params
Definition at line 29 of file SGNDArray.h.
constructor to create new ndarray in memory
Definition at line 33 of file SGNDArray.h.
copy constructor
Definition at line 43 of file SGNDArray.h.
|
virtual |
empty destructor
Definition at line 48 of file SGNDArray.h.
|
virtual |
destroy ndarray
Definition at line 67 of file SGNDArray.h.
|
virtual |
free ndarray
Definition at line 53 of file SGNDArray.h.
T* get_matrix | ( | index_t | matIdx | ) | const |
get a matrix formed by the two first dimensions
matIdx | matrix index |
Definition at line 78 of file SGNDArray.h.
const T& operator[] | ( | index_t | index | ) | const |
operator overload for ndarray read only access
index | to access |
Definition at line 88 of file SGNDArray.h.
T& operator[] | ( | index_t | index | ) |
operator overload for ndarray r/w access
index | to access |
Definition at line 97 of file SGNDArray.h.
void transpose_matrix | ( | index_t | matIdx | ) | const |
transposes a matrix formed by the two first dimensions
matIdx | matrix index |
Definition at line 106 of file SGNDArray.h.
T* array |
array
Definition at line 130 of file SGNDArray.h.
index_t* dims |
dimension sizes
Definition at line 132 of file SGNDArray.h.
bool do_free |
whether ndarry needs to be freed
Definition at line 136 of file SGNDArray.h.
index_t num_dims |
number of dimensions
Definition at line 134 of file SGNDArray.h.