FEI
Version of the Day
|
#include <fei_ctg_set.hpp>
Classes | |
class | const_iterator |
Public Types | |
typedef T | key_type |
Public Member Functions | |
ctg_set (int alloc_incr=32) | |
ctg_set (const ctg_set< T > &src) | |
virtual | ~ctg_set () |
const_iterator | begin () const |
ctg_set< T > & | operator= (const ctg_set< T > &src) |
bool | operator!= (const ctg_set< T > &rhs) |
int | clear () |
std::pair< const_iterator, bool > | insert (const T &item) |
void | insert2 (const T &item) |
int | insert2_dense_group (const T &starting_index, int group_size) |
const_iterator | find (const T &item) |
int | copy_to_array (int len, T *items) const |
int | copy_to_vector (std::vector< T > &items) const |
int | size () const |
Static Public Member Functions | |
static const_iterator | end () |
A specialized container that mimics std::set in many ways. This set can only be used for integer types (such as short, int, long).
This container is optimized for inserting/storing indices that have significant contiguous sections or ranges.
Data is stored in an array in pairs, where each pair represents a contiguous range. The first item in a pair is the beginning of the range, and the second item in a pair is one greater than the end of the range. Example: Assume the data to be stored is 0, 1, 2, 3, 6, 7, 8, which forms two contiguous ranges 0 - 3 and 6 - 8. This container will store this data in an array like this: 0, 4, 6, 9.
Definition at line 39 of file fei_ctg_set.hpp.
typedef T fei::ctg_set< T >::key_type |
alias for template parameter
Definition at line 61 of file fei_ctg_set.hpp.
|
inline |
constructor
Definition at line 42 of file fei_ctg_set.hpp.
|
inline |
constructor
Definition at line 46 of file fei_ctg_set.hpp.
|
inlinevirtual |
destructor
Definition at line 58 of file fei_ctg_set.hpp.
|
inline |
iterator pointing to the beginning of ctg_set's contents
Definition at line 145 of file fei_ctg_set.hpp.
|
inlinestatic |
iterator pointing one past the end of ctg_set's contents
Definition at line 155 of file fei_ctg_set.hpp.
|
inline |
assignment operator=
Definition at line 158 of file fei_ctg_set.hpp.
|
inline |
operator!=
Definition at line 168 of file fei_ctg_set.hpp.
|
inline |
Clear the contents of this set. (Get rid of the contents.)
Definition at line 185 of file fei_ctg_set.hpp.
|
inline |
Insert item in this set, if not already present. Return value is a pair with an iterator, and a bool indicating whether the insertion was made.
Definition at line 198 of file fei_ctg_set.hpp.
|
inline |
insert2 – power-users only
Definition at line 326 of file fei_ctg_set.hpp.
|
inline |
insert2_dense_group – not really implemented correctly
Definition at line 427 of file fei_ctg_set.hpp.
|
inline |
find specified item in ctg_set. If not found, return iterator==end().
Definition at line 437 of file fei_ctg_set.hpp.
|
inline |
Copy contents of ctg_set into array of length len. The number of items copied into array is min(len, size()).
Definition at line 465 of file fei_ctg_set.hpp.
|
inline |
Copy contents of ctg_set into std::vector.
Definition at line 481 of file fei_ctg_set.hpp.
|
inline |
return size of ctg_set.
Definition at line 490 of file fei_ctg_set.hpp.