Public 成员函数 | |
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 (SGVector< index_t > d, bool ref_counting=true) | |
SGNDArray (const SGNDArray &orig) | |
virtual | ~SGNDArray () |
SGNDArray< T > | clone () const |
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) |
SGVector< index_t > | get_dimensions () const |
void | set_const (T const_elem) |
SGNDArray< T > & | operator*= (T val) |
SGNDArray< T > & | operator+= (SGNDArray &ndarray) |
SGNDArray< T > & | operator-= (SGNDArray &ndarray) |
T | max_element (index_t &max_at) |
void | expand (SGNDArray &big_array, SGVector< index_t > &axes) |
T | get_value (SGVector< index_t > index) const |
void | next_index (SGVector< index_t > &curr_index) const |
template<> | |
SGNDArray< bool > & | operator*= (bool val) |
template<> | |
SGNDArray< char > & | operator*= (char val) |
template<> | |
SGNDArray< bool > & | operator+= (SGNDArray &ndarray) |
template<> | |
SGNDArray< char > & | operator+= (SGNDArray &ndarray) |
template<> | |
SGNDArray< bool > & | operator-= (SGNDArray &ndarray) |
template<> | |
SGNDArray< char > & | operator-= (SGNDArray &ndarray) |
template<> | |
bool | max_element (int32_t &max_at) |
template<> | |
char | max_element (int32_t &max_at) |
int32_t | ref_count () |
Public 属性 | |
T * | array |
index_t * | dims |
index_t | num_dims |
index_t | len_array |
Protected 成员函数 | |
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
在文件 SGNDArray.cpp 第 20 行定义.
constructor for setting params
a | data of the array |
d | dimentions of the array |
nd | number of dimentions |
ref_counting | if true, count the reference |
在文件 SGNDArray.cpp 第 26 行定义.
constructor to create new ndarray in memory
d | dimentions of the array |
nd | number of dimentions |
ref_counting | if true, count the reference |
在文件 SGNDArray.cpp 第 39 行定义.
constructor to create new ndarray of given bases
d | dimentions of the array |
ref_counting | if true, count the reference |
在文件 SGNDArray.cpp 第 50 行定义.
|
virtual |
empty destructor
在文件 SGNDArray.cpp 第 73 行定义.
SGNDArray< T > clone | ( | ) | const |
在文件 SGNDArray.cpp 第 105 行定义.
|
protectedvirtual |
|
protectedinherited |
copy refcount
在文件 SGReferencedData.cpp 第 55 行定义.
expand to a big size array
big_array | the target big size array |
axes | the axis where the current ndarray will be replicated |
在文件 SGNDArray.cpp 第 303 行定义.
|
protectedvirtual |
在文件 SGNDArray.cpp 第 112 行定义.
T* get_matrix | ( | index_t | matIdx | ) | const |
get a matrix formed by the two first dimensions
matIdx | matrix index |
在文件 SGNDArray.h 第 72 行定义.
get the value at index
index | vector of indices where the value to retrieve of the array is located |
在文件 SGNDArray.cpp 第 266 行定义.
|
protectedvirtual |
T max_element | ( | index_t & | max_at | ) |
find the maximum value of the elements
max_at | the index of the maximum element, index is in 1-d flattend array. If there are multiple maximum element, return the last index. |
在文件 SGNDArray.cpp 第 232 行定义.
bool max_element | ( | int32_t & | max_at | ) |
在文件 SGNDArray.cpp 第 252 行定义.
char max_element | ( | int32_t & | max_at | ) |
在文件 SGNDArray.cpp 第 259 行定义.
SGNDArray< T > & operator*= | ( | T | val | ) |
operator overload of multiplication assignment
val | a scalar value to multiply |
在文件 SGNDArray.cpp 第 153 行定义.
SGNDArray< bool > & operator*= | ( | bool | val | ) |
在文件 SGNDArray.cpp 第 162 行定义.
SGNDArray< char > & operator*= | ( | char | val | ) |
在文件 SGNDArray.cpp 第 169 行定义.
operator overload of addition assignment
ndarray | N-d array to add |
在文件 SGNDArray.cpp 第 176 行定义.
在文件 SGNDArray.cpp 第 190 行定义.
在文件 SGNDArray.cpp 第 197 行定义.
operator overload of subtruction assignment
ndarray | N-d array to add |
在文件 SGNDArray.cpp 第 204 行定义.
在文件 SGNDArray.cpp 第 218 行定义.
在文件 SGNDArray.cpp 第 225 行定义.
const T& operator[] | ( | index_t | index | ) | const |
T& operator[] | ( | index_t | index | ) |
|
protectedinherited |
|
inherited |
void set_const | ( | T | const_elem | ) |
set N-d array to a constant
const_elem | constant value to set N-d array to |
在文件 SGNDArray.cpp 第 146 行定义.
void transpose_matrix | ( | index_t | matIdx | ) | const |
transposes a matrix formed by the two first dimensions
matIdx | matrix index |
在文件 SGNDArray.cpp 第 122 行定义.
|
protectedinherited |
decrement reference counter and deallocate object if refcount is zero before or after decrementing it
在文件 SGReferencedData.cpp 第 84 行定义.
T* array |
array
在文件 SGNDArray.h 第 174 行定义.
index_t* dims |
dimension sizes
在文件 SGNDArray.h 第 177 行定义.
index_t len_array |
the flatten length of the N-d array
在文件 SGNDArray.h 第 183 行定义.
index_t num_dims |
number of dimensions
在文件 SGNDArray.h 第 180 行定义.