Represents a set of nodes by an array.
More...
#include <TNodeSet.hh>
Public Member Functions |
| TNodeSet (const size_t set_size=0) |
| construct node set with maximal capacity set_size
|
| TNodeSet (const TNodeSet &set) |
| copy ctor
|
size_t | size () const |
| return capacity of node set
|
node_t & | operator[] (const size_t i) |
| return i'th node in set
|
TIterator | begin () const |
| return iterator to start of node set
|
TIterator | end () const |
| return iterator to end of node set
|
size_t | n_nodes () const |
| return number of stored nodes
|
void | set_n_nodes (const size_t n) |
| directly set number of stored nodes
|
TNodeSet & | append (const node_t node) |
| append node node to the set (without incrementing the array-size)
|
TNodeSet & | remove_all () |
| remove all nodes from set (array-size is not changed)
|
void | resize (const size_t n, const bool=true) |
| adjust capacity to n and node number
|
void | resize (const size_t n, const uint &, const bool) |
| adjust capacity to n and node number
|
TNodeSet & | operator= (const TNodeSet &set) |
| copy operator
|
Protected Attributes |
std::vector< node_t > | _data |
| array containing nodeset
|
size_t | _n_nodes |
| actual number of nodes in set
|
Detailed Description
- maximal size of nodeset, e.g. the capacity, is equal to array-size
- current number of members is equal to _n_nodes