SHOGUN
v3.0.0
|
shogun n-dimensional array
Definition at line 23 of file SGNDArray.h.
Public Member Functions | |
SGNDArray () | |
SGNDArray (T *a, index_t *d, index_t nd, bool ref_counting=true) | |
SGNDArray (index_t *d, index_t nd, bool ref_counting=true) | |
SGNDArray (const SGNDArray &orig) | |
virtual | ~SGNDArray () |
T * | get_matrix (index_t matIdx) const |
void | transpose_matrix (index_t matIdx) const |
const T & | operator[] (index_t index) const |
T & | operator[] (index_t index) |
int32_t | ref_count () |
Public Attributes | |
T * | array |
index_t * | dims |
index_t | num_dims |
Protected Member Functions | |
virtual void | copy_data (const SGReferencedData &orig) |
virtual void | init_data () |
virtual void | free_data () |
void | copy_refcount (const SGReferencedData &orig) |
int32_t | ref () |
int32_t | unref () |
SGNDArray | ( | ) |
default constructor
Definition at line 20 of file SGNDArray.cpp.
constructor for setting params
Definition at line 26 of file SGNDArray.cpp.
constructor to create new ndarray in memory
Definition at line 34 of file SGNDArray.cpp.
copy constructor
Definition at line 44 of file SGNDArray.cpp.
|
virtual |
empty destructor
Definition at line 50 of file SGNDArray.cpp.
|
protectedvirtual |
|
protectedinherited |
copy refcount
Definition at line 58 of file SGReferencedData.cpp.
|
protectedvirtual |
T* get_matrix | ( | index_t | matIdx | ) | const |
get a matrix formed by the two first dimensions
matIdx | matrix index |
Definition at line 46 of file SGNDArray.h.
|
protectedvirtual |
const T& operator[] | ( | index_t | index | ) | const |
operator overload for ndarray read only access
index | to access |
Definition at line 62 of file SGNDArray.h.
T& operator[] | ( | index_t | index | ) |
operator overload for ndarray r/w access
index | to access |
Definition at line 71 of file SGNDArray.h.
|
protectedinherited |
increase reference counter
Definition at line 67 of file SGReferencedData.cpp.
|
inherited |
display reference counter
Definition at line 44 of file SGReferencedData.cpp.
void transpose_matrix | ( | index_t | matIdx | ) | const |
transposes a matrix formed by the two first dimensions
matIdx | matrix index |
Definition at line 79 of file SGNDArray.cpp.
|
protectedinherited |
decrement reference counter and deallocate object if refcount is zero before or after decrementing it
Definition at line 87 of file SGReferencedData.cpp.
T* array |
array
Definition at line 90 of file SGNDArray.h.
index_t* dims |
dimension sizes
Definition at line 93 of file SGNDArray.h.
index_t num_dims |
number of dimensions
Definition at line 96 of file SGNDArray.h.