This class represents a tree based on a Boost.Graph. More...
Public Types | |
typedef boost::graph_as_tree < Graph, boost::iterator_property_map < typename std::vector < typename boost::graph_traits < Graph >::vertex_descriptor > ::iterator, typename boost::property_map< Graph, boost::vertex_index_t >::type > , typename boost::graph_traits < Graph >::vertex_descriptor > | super |
Type of super class. More... | |
typedef Graph | graph_type |
Type of the graph. More... | |
typedef boost::graph_traits < Graph >::vertex_descriptor | node_type |
Type of a node. More... | |
Public Member Functions | |
constructible_tree () | |
Standard constructor. More... | |
const Graph & | graph () const |
Returns the underlying graph. More... | |
Graph & | graph () |
Returns a mutable reference to the underlying graph. More... | |
node_type | root () const |
Returns the root of the graph. More... | |
void | set_root (node_type root) |
Sets the root of the graph. More... | |
node_type | parent (node_type n) const |
Returns the parent of a node. More... | |
void | children (node_type n, std::vector< node_type > &children) const |
Returns the children of a node. More... | |
This class represents a tree based on a Boost.Graph.
This class uses the boost::graph_as_tree, but offers convinient methods for access the root, children, and parents.
typedef Graph graph_type |
Type of the graph.
typedef boost::graph_traits<Graph>::vertex_descriptor node_type |
Type of a node.
typedef boost::graph_as_tree<Graph, boost::iterator_property_map<typename std::vector<typename boost::graph_traits<Graph>::vertex_descriptor>::iterator, typename boost::property_map<Graph, boost::vertex_index_t>::type>, typename boost::graph_traits<Graph>::vertex_descriptor> super |
Type of super class.
|
inline |
Standard constructor.
Initializes default values
Returns the children of a node.
n | Node |
children | Empty list containing the children of node n after the call |
|
inline |
Returns the underlying graph.
|
inline |
Returns a mutable reference to the underlying graph.
Returns the parent of a node.
n | Node |
n
|
inline |
Returns the root of the graph.
|
inline |
Sets the root of the graph.
root | Node |