公有成员 | 保护成员 | 保护属性

CStringFileFeatures< ST >模板类参考


详细描述

template<class ST>
class shogun::CStringFileFeatures< ST >

File based string features.

StringFeatures that are file based. Underneath memory mapped files are used. Derived from CStringFeatures thus transparently enabling all of the StringFeature functionality.

Supported file format contains one string per line, lines of variable length are supported and must be separated by '
'.

在文件StringFileFeatures.h34行定义。

继承图,类CStringFileFeatures< ST >
Inheritance graph
[图例]

所有成员的列表。

公有成员

 CStringFileFeatures ()
 CStringFileFeatures (const char *fname, EAlphabet alpha)
virtual ~CStringFileFeatures ()

保护成员

ST * get_line (uint64_t &len, uint64_t &offs, int32_t &line_nr, uint64_t file_length)
virtual void cleanup ()
virtual void cleanup_feature_vector (int32_t num)
void fetch_meta_info_from_file (int32_t granularity=1048576)

保护属性

CMemoryMappedFile< ST > * file

构造及析构函数文档

default constructor

在文件StringFileFeatures.h41行定义。

CStringFileFeatures ( const char *  fname,
EAlphabet  alpha 
)

constructor

参数:
fname filename of the file containing line based features
alpha alphabet (type) to use for string features

在文件StringFileFeatures.h50行定义。

virtual ~CStringFileFeatures (  )  [virtual]

default destructor

在文件StringFileFeatures.h60行定义。


成员函数文档

virtual void cleanup (  )  [protected, virtual]

cleanup string features

重载CStringFeatures< ST >

在文件StringFileFeatures.h112行定义。

virtual void cleanup_feature_vector ( int32_t  num  )  [protected, virtual]

cleanup a single feature vector

重载CStringFeatures< ST >

在文件StringFileFeatures.h131行定义。

void fetch_meta_info_from_file ( int32_t  granularity = 1048576  )  [protected]

obtain meta information from file

i.e., determine number of strings and their lengths

在文件StringFileFeatures.h141行定义。

ST* get_line ( uint64_t &  len,
uint64_t &  offs,
int32_t &  line_nr,
uint64_t  file_length 
) [protected]

get next line from file

The returned line may be modfied in case the file was opened read/write. It is otherwise read-only.

参数:
len length of line (returned via reference)
offs offset to be passed for reading next line, should be 0 initially (returned via reference)
line_nr used to indicate errors (returned as reference should be 0 initially)
file_length total length of the file (for error checking)
返回:
line (NOT ZERO TERMINATED)

在文件StringFileFeatures.h81行定义。


成员数据文档

CMemoryMappedFile<ST>* file [protected]

memory mapped file

在文件StringFileFeatures.h190行定义。


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

SHOGUN Machine Learning Toolbox - Documentation