58#include <lal/graphs/rooted_tree.hpp>
59#include <lal/detail/linarr/DMax_utils.hpp>
60#include <lal/detail/linarr/Dopt_utils.hpp>
80template <
bool make_arrangement>
83 std::pair<uint64_t, linear_arrangement>,
89 assert(t.is_rooted_tree());
92 const uint64_t n = t.get_num_nodes();
94 if constexpr (make_arrangement) {
102 std::vector<std::vector<node_size>> L(n);
109 if constexpr (make_arrangement) {
112 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
Maximum projective arrangement of a rooted tree.
Definition: DMax_Projective_AEF.hpp:86
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: DMax_utils.hpp:197
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