![]() |
Quetzal-CoaTL
The Coalescence Template Library
|
Public Member Functions | |
binary_tree_common () | |
Default constructor. | |
binary_tree_common (size_t n) | |
Constructs a tree with \(n\) vertices. | |
Topology Lookup | |
bool | is_isomorphic (binary_tree_common const &other) const |
Detects if there is a 1-to-1 mapping of the vertices in one graph to the vertices of another graph such that adjacency is preserved. | |
vertex_descriptor | find_root_from (vertex_descriptor u) const |
Finds the root of the tree graph starting from a vertex \(u\). | |
degree_size_type | degree (vertex_descriptor u) const |
Returns the number of in-edges plus out-edges. | |
degree_size_type | in_degree (vertex_descriptor u) const |
Returns the number of in-edges of vertex \(u\). | |
degree_size_type | out_degree (vertex_descriptor v) const |
Returns the number of out-edges of vertex \(v\). | |
bool | has_predecessor (vertex_descriptor u) const |
Evaluates if vertex \(u\) has a predecessor. | |
vertex_descriptor | predecessor (vertex_descriptor u) const |
The predecessor of vertex \(u\). | |
bool | has_successors (vertex_descriptor u) const |
Evaluates if vertex \(u\) has successors. | |
auto | successors (vertex_descriptor u) const |
The successors of vertex \(u\). | |
bool | is_left_successor (vertex_descriptor u) const |
Evaluate if vertex \(u\) is a left successor. | |
bool | is_right_successor (vertex_descriptor u) const |
Evaluate if vertex \(u\) is a right successor. | |
Iterators | |
std::pair< in_edge_iterator, in_edge_iterator > | in_edges (vertex_descriptor u) const |
Provides iterators to iterate over the in-going edges of vertex \(u\). | |
Algorithms | |
template<typename DFSTreeVisitor > | |
void | depth_first_search (vertex_descriptor s, DFSTreeVisitor &vis) |
Performs a read-and-write depth-first traversal of the vertices starting at vertex \(s\). | |
template<typename DFSTreeVisitor > | |
void | depth_first_search (vertex_descriptor s, DFSTreeVisitor &vis) const |
Performs a read-only depth-first traversal of the vertices starting at vertex \(s\). | |
Input/Output | |
void | to_graphviz (std::ostream &out) const |
Print the tree to the graphviz format. | |
Static Public Member Functions | |
static constexpr vertex_descriptor | null_vertex () |
Protected Types | |
using | base = boost::binary_tree< true, std::size_t > |
Equivalent to bidirectional_binary_tree. | |
Protected Attributes | |
base | _graph |
|
inline |
Returns the number of in-edges plus out-edges.
u | The vertex \(u\) |
|
inline |
Performs a read-and-write depth-first traversal of the vertices starting at vertex \(s\).
DFSTreeVisitor |
s | The vertex to start from. |
vis | The visitor to apply. |
|
inline |
Performs a read-only depth-first traversal of the vertices starting at vertex \(s\).
DFSTreeVisitor |
s | The vertex to start from. |
vis | The visitor to apply. |
|
inline |
Finds the root of the tree graph starting from a vertex \(u\).
u | The vertex to start from. |
|
inline |
Evaluates if vertex \(u\) has a predecessor.
u | The vertex to evaluate |
|
inline |
Evaluates if vertex \(u\) has successors.
u | The vertex to evaluate |
|
inline |
Returns the number of in-edges of vertex \(u\).
u | The vertex \(u\) |
|
inline |
Provides iterators to iterate over the in-going edges of vertex \(u\).
u | The vertex \(u\). |
|
inline |
Detects if there is a 1-to-1 mapping of the vertices in one graph to the vertices of another graph such that adjacency is preserved.
other | A binary tree graph. |
|
inline |
Evaluate if vertex \(u\) is a left successor.
u | The vertex to be evaluated |
|
inline |
Evaluate if vertex \(u\) is a right successor.
u | The vertex to be evaluated |
|
inline |
The predecessor of vertex \(u\).
u | The vertex |
|
inline |
The successors of vertex \(u\).
u | The vertex |