LAL: Linear Arrangement Library 24.10.00
A library focused on algorithms on linear arrangements of graphs.
|
Algorithms for caterpillar trees. More...
Enumerations | |
enum | result { distance , distance_vertices , distance_structure } |
What is to be calculated when finding the maximum spanning caterpillar. More... | |
Functions | |
template<class tree_t > | |
node | find_farthest_vertex (const tree_t &t, const node start_at, BFS< tree_t > &bfs, array< uint64_t > &num_vertices_in_path, array< uint64_t > &weight) noexcept |
Find the farthest vertex from start_at in the tree. | |
template<result ret_type, class tree_t , std::enable_if_t< std::is_base_of_v< graphs::tree, tree_t >, bool > = true> | |
conditional_list_t< bool_sequence< ret_type==result::distance, ret_type==result::distance_vertices, ret_type==result::distance_structure >, type_sequence< uint64_t, std::tuple< uint64_t, std::vector< char > >, std::tuple< uint64_t, std::vector< node >, std::vector< char > > > > | max_subtree (const tree_t &t) noexcept |
Calculate the maximum spanning caterpillar of a tree. | |
Algorithms for caterpillar trees.
What is to be calculated when finding the maximum spanning caterpillar.
|
nodiscardnoexcept |
Find the farthest vertex from start_at in the tree.
Distance is defined as the number of vertices in the path plus the number of vertices neighbouring the path.
tree_t | Type of tree. |
t | Input tree. |
start_at | Starting vertex. |
bfs | Traversal object. |
num_vertices_in_path | Function memory. |
weight | Function memory. |
|
nodiscardnoexcept |
Calculate the maximum spanning caterpillar of a tree.
ret_type | Specify the return type. |
tree_t | Tree type |
t | Input tree |