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

CAttributeFeatures类参考


详细描述

Implements attributed features, that is in the simplest case a number of (attribute, value) pairs.

For example

x[0...].attr1 = <value(s)> x[0...].attr2 = <value(s)>.

A more complex example would be nested structures x[0...].attr1[0...].subattr1 = ..

This might be used to represent (attr, value) pairs, simple structures, trees ...

在文件AttributeFeatures.h46行定义。

继承图,类CAttributeFeatures
Inheritance graph
[图例]

所有成员的列表。

公有成员

 CAttributeFeatures ()
virtual ~CAttributeFeatures ()
CFeaturesget_attribute (char *attr_name)
void get_attribute_by_index (int idx, const char *&attr_name, CFeatures *&attr_obj)
bool set_attribute (char *attr_name, CFeatures *attr_obj)
bool del_attribute (char *attr_name)
int32_t get_num_attributes ()
virtual const char * get_name () const

保护成员

int32_t find_attr_index (char *attr_name)

保护属性

CDynamicArray< T_ATTRIBUTE > features
 list of attributes (sorted)

构造及析构函数文档

default constructor

在文件AttributeFeatures.cpp16行定义。

~CAttributeFeatures (  ) [virtual]

destructor

在文件AttributeFeatures.cpp21行定义。


成员函数文档

bool del_attribute ( char *  attr_name )

delete the attribute matching attribute name

参数:
attr_nameattribute name
返回:
true on success

在文件AttributeFeatures.h114行定义。

int32_t find_attr_index ( char *  attr_name ) [protected]

find the index of the attribute matching attribute name

参数:
attr_nameattribute name
返回:
index (if found), otherwise -1

在文件AttributeFeatures.h147行定义。

CFeatures* get_attribute ( char *  attr_name )

return the feature object matching attribute name

参数:
attr_nameattribute name
返回:
feature object

在文件AttributeFeatures.h61行定义。

void get_attribute_by_index ( int  idx,
const char *&  attr_name,
CFeatures *&  attr_obj 
)

return the feature object at index

参数:
idxindex of attribute
attr_nameattribute name (returned by reference)
attr_objattribute object (returned by reference)

在文件AttributeFeatures.h80行定义。

virtual const char* get_name (  ) const [virtual]
返回:
object name

实现了CSGObject

在文件AttributeFeatures.h139行定义。

int32_t get_num_attributes (  )

get number of attributes

返回:
number of attributes

在文件AttributeFeatures.h133行定义。

bool set_attribute ( char *  attr_name,
CFeatures attr_obj 
)

set the feature object for attribute name

参数:
attr_nameattribute name
attr_objfeature object to set
返回:
true on success

在文件AttributeFeatures.h94行定义。


成员数据文档

CDynamicArray<T_ATTRIBUTE> features [protected]

list of attributes (sorted)

在文件AttributeFeatures.h162行定义。


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

SHOGUN Machine Learning Toolbox - Documentation