|
void | init (std::size_t n) noexcept |
| Initializes this path.
|
|
void | add_node (node u) noexcept |
| Adds a node to this path.
|
|
void | set_h1 (node h) noexcept |
| Sets the first vertex of degree different from 2.
|
|
void | set_h2 (node h) noexcept |
| Sets the second vertex of degree different from 2.
|
|
void | set_lowest_lexicographic (node l) noexcept |
| Set lowest lexicographic vertex.
|
|
node | operator[] (std::size_t i) const noexcept |
| Access the i-th node in the path.
|
|
node | get_h1 () const noexcept |
| Gets the first vertex of degree different from 2.
|
|
node | get_h2 () const noexcept |
| Gets the second vertex of degree different from 2.
|
|
bool | has_lowest_lexicographic () const noexcept |
| Does this path have a lowest lexicographic vertex?
|
|
node | get_lowest_lexicographic () const noexcept |
| Gets the lowest lexicographic vertex.
|
|
const std::vector< node > & | get_vertex_sequence () const noexcept |
| Gets the vertex sequence of this path as a vector.
|
|
std::size_t | get_num_nodes () const noexcept |
| Number of vertices in this path.
|
|
std::size_t | get_num_edges () const noexcept |
| Number of edges in this path.
|
|
bool | has_node (node u) const noexcept |
| Does this path include node u?
|
|
std::size_t | get_position (node u) const noexcept |
| Returns the get_position of node u in m_vertex_sequence.
|
|
template<class graph_t > |
bool | is_antenna (const graph_t &t) const noexcept |
| Is the given path an antenna?
|
|
Branchless paths in trees.
A branchless path in a tree is a sequence of vertices of degree two, enclosed by (at most) two vertices of degree different from two. The path graph is a branchless path itself. The legs of a spider graph are all branchless paths, which include the center of the spider.
Before adding vertices to this path, it must be initialized via function init.
The vertices in each branchless path are of two categories: internal and endpoints. The endpoints of the path are the only two vertices of degree different from two. The internal vertices are the (possibly 0) vertices of degree 2.