|
LAL: Linear Arrangement Library 23.01.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, node start_at, BFS< tree_t > &bfs, data_array< uint64_t > &num_vertices_in_path, data_array< uint64_t > &weight) noexcept |
| Find the farthest vertex from start_at in the tree. More... | |
| 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. More... | |
Algorithms for caterpillar trees.
What is to be calculated when finding the maximum spanning caterpillar.
|
noexcept |
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. |
|
noexcept |
Calculate the maximum spanning caterpillar of a tree.
| ret_type | Specify the return type. |
| tree_t | Tree type |
| t | Input tree |