Detailed Description
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.
Definition at line 26 of file Set.h.
List of all members.
Constructor & Destructor Documentation
CSet |
( |
bool |
traceable = true |
) |
|
Default constructor
Definition at line 30 of file Set.h.
Default destructor
Definition at line 36 of file Set.h.
Member Function Documentation
Add an element to the set
- Parameters:
-
Definition at line 45 of file Set.h.
Remove an element from the set
- Parameters:
-
| e | element to be looked for |
Definition at line 66 of file Set.h.
- Returns:
- underlying array in memory
Definition at line 129 of file Set.h.
T get_element |
( |
int32_t |
index |
) |
const |
get set element at index
(does NOT do bounds checking)
- Parameters:
-
- Returns:
- array element at index
Definition at line 98 of file Set.h.
T* get_element_ptr |
( |
int32_t |
index |
) |
|
get set element at index as reference
(does NOT do bounds checking)
- Parameters:
-
- Returns:
- array element at index
Definition at line 110 of file Set.h.
virtual const char* get_name |
( |
void |
|
) |
const [virtual] |
int32_t get_num_elements |
( |
void |
|
) |
const |
get number of elements
- Returns:
- number of elements
Definition at line 86 of file Set.h.
Index of element in the set
- Parameters:
-
- Returns:
- index of the element or -1 if not found
Definition at line 77 of file Set.h.
T operator[] |
( |
int32_t |
index |
) |
const |
operator overload for set read only access use add() for write access
DOES NOT DO ANY BOUNDS CHECKING
- Parameters:
-
- Returns:
- element at index
Definition at line 123 of file Set.h.
Remove an element from the set
- Parameters:
-
Definition at line 55 of file Set.h.
Member Data Documentation
dynamic array the set is based on
Definition at line 139 of file Set.h.
The documentation for this class was generated from the following file: