SHOGUN  v3.2.0
所有成员列表 | Public 成员函数 | 静态 Public 成员函数 | Public 属性
TSGDataType结构体 参考

详细描述

Datatypes that shogun supports.

在文件 DataType.h 第 67 行定义.

Public 成员函数

 TSGDataType (EContainerType ctype, EStructType stype, EPrimitiveType ptype)
 
 TSGDataType (EContainerType ctype, EStructType stype, EPrimitiveType ptype, index_t *length)
 
 TSGDataType (EContainerType ctype, EStructType stype, EPrimitiveType ptype, index_t *length_y, index_t *length_x)
 
bool equals (TSGDataType other)
 
bool equals_without_length (TSGDataType other)
 
bool operator== (const TSGDataType &a)
 
bool operator!= (const TSGDataType &a)
 
void to_string (char *dest, size_t n) const
 
size_t sizeof_stype () const
 
size_t sizeof_ptype () const
 
size_t get_size ()
 
int64_t get_num_elements ()
 

静态 Public 成员函数

static size_t sizeof_ptype (EPrimitiveType ptype)
 
static size_t sizeof_stype (EStructType stype, EPrimitiveType ptype)
 
static size_t sizeof_sparseentry (EPrimitiveType ptype)
 
static size_t offset_sparseentry (EPrimitiveType ptype)
 
static void stype_to_string (char *dest, EStructType stype, EPrimitiveType ptype, size_t n)
 
static void ptype_to_string (char *dest, EPrimitiveType ptype, size_t n)
 
static bool string_to_ptype (EPrimitiveType *ptype, const char *str)
 

Public 属性

EContainerType m_ctype
 
EStructType m_stype
 
EPrimitiveType m_ptype
 
index_t * m_length_y
 
index_t * m_length_x
 

构造及析构函数说明

TSGDataType ( EContainerType  ctype,
EStructType  stype,
EPrimitiveType  ptype 
)
explicit

constructor

参数
ctype
stype
ptype

在文件 DataType.cpp 第 21 行定义.

TSGDataType ( EContainerType  ctype,
EStructType  stype,
EPrimitiveType  ptype,
index_t *  length 
)
explicit

constructor

参数
ctype
stype
ptype
length

在文件 DataType.cpp 第 28 行定义.

TSGDataType ( EContainerType  ctype,
EStructType  stype,
EPrimitiveType  ptype,
index_t *  length_y,
index_t *  length_x 
)
explicit

constructor

参数
ctype
stype
ptype
length_y
length_x

在文件 DataType.cpp 第 35 行定义.

成员函数说明

bool equals ( TSGDataType  other)

Compares the content of the data types, including the length fields if non-NULL

返回
other type to compare with
true if equals, false otherwise

在文件 DataType.cpp 第 94 行定义.

bool equals_without_length ( TSGDataType  other)

Compares the content of the data types, excluding the length fields

返回
other type to compare with
true if equals, false otherwise

在文件 DataType.cpp 第 66 行定义.

int64_t get_num_elements ( )

get num of elements

返回
number of (matrix, vector, scalar) elements of type

在文件 DataType.cpp 第 463 行定义.

size_t get_size ( )

get size

返回
size of type in bytes

在文件 DataType.cpp 第 439 行定义.

size_t offset_sparseentry ( EPrimitiveType  ptype)
static

offset of sparse entry

参数
ptype

在文件 DataType.cpp 第 307 行定义.

bool operator!= ( const TSGDataType &  a)

inequality

参数
a

在文件 DataType.h 第 125 行定义.

bool operator== ( const TSGDataType &  a)

equality

在文件 DataType.cpp 第 44 行定义.

void ptype_to_string ( char *  dest,
EPrimitiveType  ptype,
size_t  n 
)
static

ptype to string

参数
dest
ptype
n

在文件 DataType.cpp 第 364 行定义.

size_t sizeof_ptype ( ) const

size of ptype

在文件 DataType.cpp 第 182 行定义.

size_t sizeof_ptype ( EPrimitiveType  ptype)
static

get the size of the primitive type ptype

参数
ptypethe primitive type
返回
its size

在文件 DataType.cpp 第 251 行定义.

size_t sizeof_sparseentry ( EPrimitiveType  ptype)
static

size of sparse entry

参数
ptype

在文件 DataType.cpp 第 278 行定义.

size_t sizeof_stype ( ) const

size of stype

在文件 DataType.cpp 第 176 行定义.

size_t sizeof_stype ( EStructType  stype,
EPrimitiveType  ptype 
)
static

get the size of the structured type stype that internally uses the primitive type ptype as type

参数
stypethe structured type
ptypethe primitive type
返回
its size

在文件 DataType.cpp 第 188 行定义.

bool string_to_ptype ( EPrimitiveType *  ptype,
const char *  str 
)
static

string to ptype

参数
ptype
str

在文件 DataType.cpp 第 392 行定义.

void stype_to_string ( char *  dest,
EStructType  stype,
EPrimitiveType  ptype,
size_t  n 
)
static

stype to string

参数
dest
stype
ptype
n

在文件 DataType.cpp 第 336 行定义.

void to_string ( char *  dest,
size_t  n 
) const

to string

参数
dest
n

在文件 DataType.cpp 第 144 行定义.

类成员变量说明

EContainerType m_ctype

container type

在文件 DataType.h 第 70 行定义.

index_t* m_length_x

length x

在文件 DataType.h 第 79 行定义.

index_t* m_length_y

length y

在文件 DataType.h 第 77 行定义.

EPrimitiveType m_ptype

primitive type

在文件 DataType.h 第 74 行定义.

EStructType m_stype

struct type

在文件 DataType.h 第 72 行定义.


该结构体的文档由以下文件生成:

SHOGUN Machine Learning Toolbox - Documentation