Quetzal-CoaTL
The Coalescence Template Library
Loading...
Searching...
No Matches
boost::binary_tree< false, Vertex > Class Template Reference

#include <quetzal/coalescence/graph/detail/cardinal_k_ary_tree.hpp>

Detailed Description

template<typename Vertex>
class boost::binary_tree< false, Vertex >

Forward Binary Tree.

Template Parameters
Vertex
Remarks
Does not store predecessors

Classes

class  traversal_category
 The ways in which the vertices in the graph can be traversed. More...
 

Public Types

using directed_category = directed_tag
 Directed, undirected or bidirectional.
 
using edge_descriptor = typename super_t::edge_descriptor
 The type for the objects used to identify edges in the graph.
 
using vertex_descriptor = typename super_t::vertex_descriptor
 The type for the objects used to identity vertices in the graph.
 
typedef disallow_parallel_edge_tag edge_parallel_category
 
typedef std::size_t degree_size_type
 
typedef std::size_t vertices_size_type
 

Public Member Functions

BOOST_STATIC_CONSTEXPR vertex_descriptor null_vertex ()
 
std::size_t num_vertices () const
 
detail::binary_tree_forward_node< binary_tree< false, 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_forward_node< binary_tree< false, 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 left edge to the parent 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.
 

Friends And Related Symbol Documentation

◆ add_edge

template<typename Vertex >
std::pair< edge_descriptor, bool > add_edge ( vertex_descriptor  u,
vertex_descriptor  v,
binary_tree< false, Vertex > &  g 
)
friend

Inserts the edge (u,v) into the graph.

Parameters
uVertex u
vVertex v
gBinary tree graph
Returns
an edge descriptor pointing to the new edge. If the edge (u,v) is already in the graph, then the bool flag returned is false and the returned edge descriptor points to the already existing edge.

◆ add_left_edge

template<typename Vertex >
edge_descriptor add_left_edge ( vertex_descriptor  parent,
vertex_descriptor  child,
binary_tree< false, Vertex > &  g 
)
friend

Add a left edge to the parent vertex.

Parameters
parentThe parent vertex
childThe child vertex
gThe binary tree graph
Returns
The descriptor of the edge added.

◆ add_right_edge

template<typename Vertex >
edge_descriptor add_right_edge ( vertex_descriptor  parent,
vertex_descriptor  child,
binary_tree< false, Vertex > &  g 
)
friend

Add a left edge to the parent vertex.

Parameters
parentThe parent vertex
childThe child vertex
gThe binary tree graph
Returns
The descriptor of the edge added.

◆ clear_vertex

template<typename Vertex >
void clear_vertex ( vertex_descriptor  u,
binary_tree< false, Vertex > &  g 
)
friend

Remove all edges to and from vertex u from the graph.

Parameters
uThe vertex u
gThe binary tree graph.

◆ remove_edge [1/2]

template<typename Vertex >
void remove_edge ( edge_descriptor  e,
binary_tree< false, Vertex > &  g 
)
friend

Remove the edge e from the graph.

Parameters
eThe edge in the graph.
gThe binary tree graph.

◆ remove_edge [2/2]

template<typename Vertex >
void remove_edge ( vertex_descriptor  u,
vertex_descriptor  v,
binary_tree< false, Vertex > &  g 
)
friend

Remove the edge (u,v) from the graph.

Parameters
uVertex u
vVertex v
gThe binary tree graph

The documentation for this class was generated from the following file: