SHOGUN  v3.0.1
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
所有成员列表 | Public 成员函数 | Public 属性 | Protected 成员函数
SGNDArray< T > 模板类 参考

详细描述

template<class T>
class shogun::SGNDArray< T >

shogun n-dimensional array

在文件 SGNDArray.h23 行定义.

类 SGNDArray< T > 继承关系图:
Inheritance graph
[图例]

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 (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 属性

T * array
 
index_tdims
 
index_t num_dims
 

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.cpp20 行定义.

SGNDArray ( T *  a,
index_t d,
index_t  nd,
bool  ref_counting = true 
)

constructor for setting params

在文件 SGNDArray.cpp26 行定义.

SGNDArray ( index_t d,
index_t  nd,
bool  ref_counting = true 
)

constructor to create new ndarray in memory

在文件 SGNDArray.cpp34 行定义.

SGNDArray ( const SGNDArray< T > &  orig)

copy constructor

在文件 SGNDArray.cpp44 行定义.

~SGNDArray ( )
virtual

empty destructor

在文件 SGNDArray.cpp50 行定义.

成员函数说明

void copy_data ( const SGReferencedData orig)
protectedvirtual

copy data

实现了 SGReferencedData.

在文件 SGNDArray.cpp55 行定义.

void copy_refcount ( const SGReferencedData orig)
protectedinherited

copy refcount

在文件 SGReferencedData.cpp58 行定义.

void free_data ( )
protectedvirtual

free data

实现了 SGReferencedData.

在文件 SGNDArray.cpp69 行定义.

T* get_matrix ( index_t  matIdx) const

get a matrix formed by the two first dimensions

参数
matIdxmatrix index
返回
pointer to the matrix

在文件 SGNDArray.h46 行定义.

void init_data ( )
protectedvirtual

init data

实现了 SGReferencedData.

在文件 SGNDArray.cpp62 行定义.

const T& operator[] ( index_t  index) const

operator overload for ndarray read only access

参数
indexto access

在文件 SGNDArray.h62 行定义.

T& operator[] ( index_t  index)

operator overload for ndarray r/w access

参数
indexto access

在文件 SGNDArray.h71 行定义.

int32_t ref ( )
protectedinherited

increase reference counter

返回
reference count

在文件 SGReferencedData.cpp67 行定义.

int32_t ref_count ( )
inherited

display reference counter

返回
reference count

在文件 SGReferencedData.cpp44 行定义.

void transpose_matrix ( index_t  matIdx) const

transposes a matrix formed by the two first dimensions

参数
matIdxmatrix index

在文件 SGNDArray.cpp79 行定义.

int32_t unref ( )
protectedinherited

decrement reference counter and deallocate object if refcount is zero before or after decrementing it

返回
reference count

在文件 SGReferencedData.cpp87 行定义.

类成员变量说明

T* array

array

在文件 SGNDArray.h90 行定义.

index_t* dims

dimension sizes

在文件 SGNDArray.h93 行定义.

index_t num_dims

number of dimensions

在文件 SGNDArray.h96 行定义.


该类的文档由以下文件生成:

SHOGUN Machine Learning Toolbox - Documentation