SHOGUN  4.1.0
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
所有成员列表 | Public 成员函数 | 静态 Public 成员函数 | Public 属性
TSGDataType结构体 参考

详细描述

Datatypes that shogun supports.

在文件 DataType.h68 行定义.

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 ( EContainerType  ctype,
EStructType  stype,
EPrimitiveType  ptype 
)
explicit

constructor

参数
ctype
stype
ptype

在文件 DataType.cpp22 行定义.

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

constructor

参数
ctype
stype
ptype
length

在文件 DataType.cpp29 行定义.

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

成员函数说明

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

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

int64_t get_num_elements ( )

get num of elements

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

在文件 DataType.cpp464 行定义.

size_t get_size ( )

get size

返回
size of type in bytes

在文件 DataType.cpp440 行定义.

size_t offset_sparseentry ( EPrimitiveType  ptype)
static

offset of sparse entry

参数
ptype

在文件 DataType.cpp308 行定义.

bool operator!= ( const TSGDataType a)

inequality

参数
a

在文件 DataType.h126 行定义.

bool operator== ( const TSGDataType a)

equality

在文件 DataType.cpp45 行定义.

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

ptype to string

参数
dest
ptype
n

在文件 DataType.cpp365 行定义.

size_t sizeof_ptype ( ) const

size of ptype

在文件 DataType.cpp183 行定义.

size_t sizeof_ptype ( EPrimitiveType  ptype)
static

get the size of the primitive type ptype

参数
ptypethe primitive type
返回
its size

在文件 DataType.cpp252 行定义.

size_t sizeof_sparseentry ( EPrimitiveType  ptype)
static

size of sparse entry

参数
ptype

在文件 DataType.cpp279 行定义.

size_t sizeof_stype ( ) const

size of stype

在文件 DataType.cpp177 行定义.

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

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

string to ptype

参数
ptype
str

在文件 DataType.cpp393 行定义.

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

stype to string

参数
dest
stype
ptype
n

在文件 DataType.cpp337 行定义.

void to_string ( char *  dest,
size_t  n 
) const

to string

参数
dest
n

在文件 DataType.cpp145 行定义.

类成员变量说明

EContainerType m_ctype

container type

在文件 DataType.h71 行定义.

index_t* m_length_x

length x

在文件 DataType.h80 行定义.

index_t* m_length_y

length y

在文件 DataType.h78 行定义.

EPrimitiveType m_ptype

primitive type

在文件 DataType.h75 行定义.

EStructType m_stype

struct type

在文件 DataType.h73 行定义.


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

SHOGUN 机器学习工具包 - 项目文档