![]() |
Quetzal-CoaTL
The Coalescence Template Library
|
#include <quetzal/coalescence/graph/detail/cardinal_k_ary_tree.hpp>
Bidirectional Binary Tree.
Vertex |
Classes | |
class | traversal_category |
The ways in which the vertices in the graph can be traversed. More... | |
Public Member Functions | |
void | clear_childrens_predecessor (vertex_descriptor u) |
Clears the children's predecessor. | |
BOOST_STATIC_CONSTEXPR vertex_descriptor | null_vertex () |
std::size_t | num_vertices () const |
detail::binary_tree_bidirectional_node< binary_tree< true, Vertex > > const & | operator[] (vertex_descriptor u) const |
bool | has_successor (vertex_descriptor u) const |
void | clear () |
void | shrink_to_fit () |
Protected Member Functions | |
vertex_descriptor | add_vertex () |
bool | add_vertex (vertex_descriptor u) |
void | remove_vertex (vertex_descriptor u) |
std::pair< edge_descriptor, bool > | add_edge (vertex_descriptor u, vertex_descriptor v) |
std::pair< edge_descriptor, bool > | add_edge_strict (vertex_descriptor u, vertex_descriptor v) |
void | remove_edge (vertex_descriptor u, vertex_descriptor v) |
void | clear_vertex (vertex_descriptor u) |
edge_descriptor | add_left_edge (vertex_descriptor parent, vertex_descriptor child) |
edge_descriptor | add_right_edge (vertex_descriptor parent, vertex_descriptor child) |
Protected Attributes | |
std::vector< detail::binary_tree_bidirectional_node< binary_tree< true, Vertex > > > | nodes |
std::vector< Vertex > | free_list |
Friends | |
edge_descriptor | add_left_edge (vertex_descriptor parent, vertex_descriptor child, binary_tree &g) |
Add a left edge to the parent vertex. | |
edge_descriptor | add_right_edge (vertex_descriptor parent, vertex_descriptor child, binary_tree &g) |
Add a right edge to the parent vertex. | |
vertex_descriptor | root (vertex_descriptor u, binary_tree const &g) |
Finds the root of the tree graph starting from a vertex u. | |
bool | is_left_successor (vertex_descriptor u, binary_tree const &g) |
Evaluate if a vertex is a left successor (child) | |
bool | is_right_successor (vertex_descriptor u, binary_tree const &g) |
Evaluate if a vertex is a right successor (child) | |
bool | has_predecessor (vertex_descriptor u, binary_tree const &g) |
Evaluates if the vertex has a predecessor (parent) | |
vertex_descriptor | predecessor (vertex_descriptor u, binary_tree const &g) |
The predecessor of a given vertex. | |
MutableGraph interface | |
std::pair< edge_descriptor, bool > | add_edge (vertex_descriptor u, vertex_descriptor v, binary_tree &g) |
Inserts the edge (u,v) into the graph. | |
void | remove_edge (vertex_descriptor u, vertex_descriptor v, binary_tree &g) |
Remove the edge (u,v) from the graph. | |
void | remove_edge (edge_descriptor e, binary_tree &g) |
Remove the edge e from the graph. | |
void | clear_vertex (vertex_descriptor u, binary_tree &g) |
Remove all edges to and from vertex u from the graph. | |
void | remove_vertex (vertex_descriptor u, binary_tree &g) |
Remove u from the vertex set of the graph. | |
BidirectionalGraph interface | |
using | in_edge_iterator = transform_iterator< make_in_edge_descriptor, vertex_descriptor const *, edge_descriptor > |
Iterate through the in-edges. | |
degree_size_type | in_degree (vertex_descriptor u, binary_tree const &g) |
Returns the number of in-edges of vertex v in graph g. | |
degree_size_type | degree (vertex_descriptor u, binary_tree const &g) |
Returns the number of in-edges plus out-edges. | |
std::pair< in_edge_iterator, in_edge_iterator > | in_edges (vertex_descriptor u, binary_tree const &g) |
Provides iterators to iterate over the in-going edges of vertex u. | |
|
inline |
Clears the children's predecessor.
u |
|
friend |
Inserts the edge (u,v) into the graph.
u | Vertex u |
v | Vertex v |
g | Binary tree graph |
|
friend |
Add a left edge to the parent vertex.
parent | The parent vertex |
child | The child vertex |
g | The binary tree graph |
|
friend |
Add a right edge to the parent vertex.
parent | The parent vertex |
child | The child vertex |
g | The binary tree graph |
|
friend |
Remove all edges to and from vertex u from the graph.
u | Vertex u |
g | The binary tree graph. |
|
friend |
Returns the number of in-edges plus out-edges.
u | The vertex u |
g | The binary tree graph |
|
friend |
Evaluates if the vertex has a predecessor (parent)
u | The vertex to evaluate |
g | The binary tree graph |
|
friend |
Returns the number of in-edges of vertex v in graph g.
u | The vertex u |
g | The binary tree graph |
|
friend |
Provides iterators to iterate over the in-going edges of vertex u.
u | The vertex u |
g | The binary tree graph |
|
friend |
Evaluate if a vertex is a left successor (child)
u | The vertex to be evaluated |
g | The binary tree graph |
|
friend |
Evaluate if a vertex is a right successor (child)
u | The vertex to be evaluated |
g | The binary tree graph |
|
friend |
The predecessor of a given vertex.
u | The vertex |
g | The binary tree graph. |
|
friend |
Remove the edge e from the graph.
e | The edge to be removed |
g | The binary tree graph |
|
friend |
Remove the edge (u,v) from the graph.
u | Vertex u |
v | Vertex v |
g | The binary tree graph |
|
friend |
Remove u from the vertex set of the graph.
u | |
g |
|
friend |
Finds the root of the tree graph starting from a vertex u.
u | The vertex to start from. |
g | The binary tree graph. |