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

详细描述

Datatypes that shogun supports.

在文件 DataType.h67 行定义.

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_tm_length_y
 
index_tm_length_x
 

构造及析构函数说明

§ TSGDataType() [1/3]

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

constructor

参数
ctype
stype
ptype

在文件 DataType.cpp21 行定义.

§ TSGDataType() [2/3]

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

constructor

参数
ctype
stype
ptype
length

在文件 DataType.cpp28 行定义.

§ TSGDataType() [3/3]

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

成员函数说明

§ equals()

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

§ equals_without_length()

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

§ get_num_elements()

int64_t get_num_elements ( )

get num of elements

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

在文件 DataType.cpp463 行定义.

§ get_size()

size_t get_size ( )

get size

返回
size of type in bytes

在文件 DataType.cpp439 行定义.

§ offset_sparseentry()

size_t offset_sparseentry ( EPrimitiveType  ptype)
static

offset of sparse entry

参数
ptype

在文件 DataType.cpp307 行定义.

§ operator!=()

bool operator!= ( const TSGDataType a)

inequality

参数
a

在文件 DataType.h125 行定义.

§ operator==()

bool operator== ( const TSGDataType a)

equality

在文件 DataType.cpp44 行定义.

§ ptype_to_string()

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

ptype to string

参数
dest
ptype
n

在文件 DataType.cpp364 行定义.

§ sizeof_ptype() [1/2]

size_t sizeof_ptype ( ) const

size of ptype

在文件 DataType.cpp182 行定义.

§ sizeof_ptype() [2/2]

size_t sizeof_ptype ( EPrimitiveType  ptype)
static

get the size of the primitive type ptype

参数
ptypethe primitive type
返回
its size

在文件 DataType.cpp251 行定义.

§ sizeof_sparseentry()

size_t sizeof_sparseentry ( EPrimitiveType  ptype)
static

size of sparse entry

参数
ptype

在文件 DataType.cpp278 行定义.

§ sizeof_stype() [1/2]

size_t sizeof_stype ( ) const

size of stype

在文件 DataType.cpp176 行定义.

§ sizeof_stype() [2/2]

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

§ string_to_ptype()

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

string to ptype

参数
ptype
str

在文件 DataType.cpp392 行定义.

§ stype_to_string()

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

stype to string

参数
dest
stype
ptype
n

在文件 DataType.cpp336 行定义.

§ to_string()

void to_string ( char *  dest,
size_t  n 
) const

to string

参数
dest
n

在文件 DataType.cpp144 行定义.

类成员变量说明

§ m_ctype

EContainerType m_ctype

container type

在文件 DataType.h70 行定义.

§ m_length_x

index_t* m_length_x

length x

在文件 DataType.h79 行定义.

§ m_length_y

index_t* m_length_y

length y

在文件 DataType.h77 行定义.

§ m_ptype

EPrimitiveType m_ptype

primitive type

在文件 DataType.h74 行定义.

§ m_stype

EStructType m_stype

struct type

在文件 DataType.h72 行定义.


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

SHOGUN Machine Learning Toolbox - Documentation