55#include <lal/graphs/rooted_tree.hpp>
56#include <lal/detail/linarr/Dmin_utils.hpp>
57#include <lal/detail/linarr/Dopt_utils.hpp>
77template <
bool make_arrangement>
80 std::pair<uint64_t, linear_arrangement>,
86 assert(t.is_rooted_tree());
89 const uint64_t n = t.get_num_nodes();
91 if constexpr (make_arrangement) {
103 std::vector<std::vector<node_size>> L(n);
110 if constexpr (make_arrangement) {
113 return {D, std::move(arr)};
Rooted tree graph class.
Definition: rooted_tree.hpp:103
Linear arrangement of vertices.
Definition: linear_arrangement.hpp:103
void identity() noexcept
Makes this arrangement an identity arrangement.
Definition: linear_arrangement.hpp:452
std::conditional_t< make_arrangement, std::pair< uint64_t, linear_arrangement >, uint64_t > AEF(const graphs::rooted_tree &t) noexcept
Minimum projective arrangement of a rooted tree.
Definition: Dmin_Projective_AEF.hpp:83
uint64_t arrange_projective(uint64_t n, const std::vector< std::vector< node_size > > &L, node r, linear_arrangement &arr) noexcept
Wrapper method for the recursive method arrange.
Definition: Dmin_utils.hpp:232
void make_sorted_adjacency_list_rooted(const graphs::rooted_tree &t, std::vector< std::vector< node_size > > &L) noexcept
Make a sorted, rooted adjacency list sorted according to the sizes of the subtrees of the input roote...
Definition: Dopt_utils.hpp:115
Main namespace of the library.
Definition: basic_types.hpp:50
Non-increasing sort.
Definition: sorting_types.hpp:51