SHOGUN v0.9.0
公有成员 | 保护属性
CSet< T >模板类参考

详细描述

template<class T>
class shogun::CSet< T >

Template Set class.

Lazy implementation of a set. Set grows and shrinks dynamically and can be conveniently iterated through via the [] operator.

在文件Set.h26行定义。

继承图,类CSet< T >
Inheritance graph
[图例]

所有成员的列表。

公有成员

 CSet ()
 ~CSet ()
void add (T e)
void remove (T e)
bool contains (T e)
int32_t get_num_elements () const
get_element (int32_t index) const
operator[] (int32_t index) const
virtual const char * get_name () const

保护属性

CDynamicArray< T > * array

构造及析构函数文档

CSet ( )

Default constructor

在文件Set.h30行定义。

~CSet ( )

Default destructor

在文件Set.h37行定义。


成员函数文档

void add ( e)

Add an element to the set

参数:
eelemet to be added

在文件Set.h46行定义。

bool contains ( e)

Remove an element from the set

参数:
eelemet to be removed

在文件Set.h67行定义。

T get_element ( int32_t  index) const

get set element at index

(does NOT do bounds checking)

参数:
indexindex
返回:
array element at index

在文件Set.h89行定义。

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

实现了CSGObject

在文件Set.h108行定义。

int32_t get_num_elements ( void  ) const

get number of elements

返回:
number of elements

在文件Set.h77行定义。

T operator[] ( int32_t  index) const

operator overload for set read only access use add() for write access

DOES NOT DO ANY BOUNDS CHECKING

参数:
indexindex
返回:
element at index

在文件Set.h102行定义。

void remove ( e)

Remove an element from the set

参数:
eelemet to be removed

在文件Set.h56行定义。


成员数据文档

CDynamicArray<T>* array [protected]

dynamic array the set is based on

在文件Set.h112行定义。


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

SHOGUN Machine Learning Toolbox - Documentation