SHOGUN  v3.2.0
所有成员列表 | Public 成员函数 | 静态 Public 成员函数 | Public 属性 | Protected 成员函数
SGMatrixList< T > 模板类 参考

详细描述

template<class T>
class shogun::SGMatrixList< T >

shogun matrix list

在文件 SGMatrixList.h22 行定义.

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

Public 成员函数

 SGMatrixList ()
 
 SGMatrixList (SGMatrix< T > *ml, int32_t nmats, bool ref_counting=true)
 
 SGMatrixList (int32_t nmats, bool ref_counting=true)
 
 SGMatrixList (SGMatrixList const &orig)
 
virtual ~SGMatrixList ()
 
SGMatrix< T > get_matrix (index_t index) const
 
SGMatrix< T > operator[] (index_t index) const
 
void set_matrix (index_t index, const SGMatrix< T > matrix)
 
int32_t ref_count ()
 

静态 Public 成员函数

static SGMatrixList< T > split (SGMatrix< T > matrix, int32_t num_components)
 

Public 属性

SGMatrix< T > * matrix_list
 
int32_t num_matrices
 

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 ()
 

构造及析构函数说明

◆ SGMatrixList() [1/4]

default constructor

在文件 SGMatrixList.cpp17 行定义.

◆ SGMatrixList() [2/4]

SGMatrixList ( SGMatrix< T > *  ml,
int32_t  nmats,
bool  ref_counting = true 
)

constructor for setting parameters

在文件 SGMatrixList.cpp23 行定义.

◆ SGMatrixList() [3/4]

SGMatrixList ( int32_t  nmats,
bool  ref_counting = true 
)

constructor to create a new matrix list in memory

在文件 SGMatrixList.cpp29 行定义.

◆ SGMatrixList() [4/4]

SGMatrixList ( SGMatrixList< T > const &  orig)

copy constructor

在文件 SGMatrixList.cpp36 行定义.

◆ ~SGMatrixList()

~SGMatrixList ( )
virtual

destructor

在文件 SGMatrixList.cpp42 行定义.

成员函数说明

◆ copy_data()

void copy_data ( const SGReferencedData orig)
protectedvirtual

copy data

实现了 SGReferencedData.

在文件 SGMatrixList.cpp66 行定义.

◆ copy_refcount()

void copy_refcount ( const SGReferencedData orig)
protectedinherited

copy refcount

在文件 SGReferencedData.cpp58 行定义.

◆ free_data()

void free_data ( )
protectedvirtual

free data

实现了 SGReferencedData.

在文件 SGMatrixList.cpp80 行定义.

◆ get_matrix()

SGMatrix< T > get_matrix ( index_t  index) const

get a matrix of the list

参数
indexmatrix index, index must be less than num_matrices although no check is performed in the method
返回
the matrix at position index of the list

在文件 SGMatrixList.cpp48 行定义.

◆ init_data()

void init_data ( )
protectedvirtual

initialize empty data

实现了 SGReferencedData.

在文件 SGMatrixList.cpp73 行定义.

◆ operator[]()

SGMatrix< T > operator[] ( index_t  index) const

operator overload to get a matrix for read & write access

参数
indexmatrix index, index must be less than num_matrices although no check is performed in the method
返回
the matrix at position index of the list

在文件 SGMatrixList.cpp54 行定义.

◆ ref()

int32_t ref ( )
protectedinherited

increase reference counter

返回
reference count

在文件 SGReferencedData.cpp67 行定义.

◆ ref_count()

int32_t ref_count ( )
inherited

display reference counter

返回
reference count

在文件 SGReferencedData.cpp44 行定义.

◆ set_matrix()

void set_matrix ( index_t  index,
const SGMatrix< T >  matrix 
)

set a matrix of the list

参数
indexmatrix index, index must be less than num_matrices although no check is performed in the method
matrixmatrix to set at index

在文件 SGMatrixList.cpp60 行定义.

◆ split()

SGMatrixList< T > split ( SGMatrix< T >  matrix,
int32_t  num_components 
)
static

divide the matrix into a list of matrices. Each of the new matrices has the same number of rows as the original so the splits to the original matrix are done column-wise.

参数
matrixmatrix to split
num_componentsnumber of new matrices
返回
list of matrices

在文件 SGMatrixList.cpp88 行定义.

◆ unref()

int32_t unref ( )
protectedinherited

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

返回
reference count

在文件 SGReferencedData.cpp87 行定义.

类成员变量说明

◆ matrix_list

SGMatrix<T>* matrix_list

matrix list

在文件 SGMatrixList.h90 行定义.

◆ num_matrices

int32_t num_matrices

number of matrices of matrix list

在文件 SGMatrixList.h93 行定义.


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

SHOGUN Machine Learning Toolbox - Documentation