Represents a set of nodes by an array.
More...
#include <TNodeSet.hh>
|
|
| 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 noexcept |
| | return capacity of node set
|
| |
|
node_t & | operator[] (const size_t i) noexcept |
| | return i'th node in set
|
| |
|
iterator | begin () const noexcept |
| | return STL iterators
|
| |
|
const_iterator | cbegin () const noexcept |
| | return STL const iterators
|
| |
|
size_t | nnodes () const noexcept |
| | return number of stored nodes
|
| |
|
void | set_nnodes (const size_t n) noexcept |
| | directly set number of stored nodes
|
| |
|
void | append (const node_t node) |
| | append node node to the set (without incrementing the array-size)
|
| |
|
void | remove_all () noexcept |
| | 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
|
| |
|
|
std::vector< node_t > | _data |
| | array containing nodeset
|
| |
|
size_t | _nnodes |
| | actual number of nodes in set
|
| |
- maximal size of nodeset, e.g. the capacity, is equal to array-size
- current number of members is equal to _n_nodes