HLIBpro  1.2
Classes | Public Member Functions | Protected Attributes | List of all members
TNodeSet Class Reference

Represents a set of nodes by an array. More...

#include <TNodeSet.hh>

Classes

class  TIterator
 Class for iterating through node sets. More...

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_toperator[] (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
TNodeSetappend (const node_t node)
 append node node to the set (without incrementing the array-size)
TNodeSetremove_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
TNodeSetoperator= (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