55#include <lal/graphs/free_tree.hpp>
56#include <lal/detail/linarr/D/Dmin/utils.hpp>
57#include <lal/detail/linarr/D/Dopt_utils.hpp>
58#include <lal/detail/pairs_utils.hpp>
78template <
bool make_arrangement>
79[[nodiscard]] std::conditional_t<
81 std::pair<uint64_t, linear_arrangement>,
90 const uint64_t n = t.get_num_nodes();
92 if constexpr (make_arrangement) {
104 std::vector<std::vector<node_size>> L;
115 if constexpr (make_arrangement) {
116 return {D, std::move(arr)};
Free tree graph class.
Definition free_tree.hpp:60
Linear arrangement of vertices.
Definition linear_arrangement.hpp:103
void identity() noexcept
Makes this arrangement an identity arrangement.
Definition linear_arrangement.hpp:507
std::conditional_t< make_arrangement, std::pair< uint64_t, linear_arrangement >, uint64_t > AEF(const graphs::free_tree &t) noexcept
Minimum planar arrangement of a free tree.
Definition Planar_AEF.hpp:84
uint64_t arrange_projective(const uint64_t n, const std::vector< std::vector< node_size > > &L, const node r, linear_arrangement &arr) noexcept
Wrapper method for the recursive method arrange.
Definition utils.hpp:236
std::pair< node, node > centroidal_vertex_plus_adjacency_list(const tree_t &t, const node x, std::vector< std::vector< node_size > > &L) noexcept
Calculates the centroid and the corresponding rooted adjacency list.
Definition tree_centroid.hpp:360
Main namespace of the library.
Definition basic_types.hpp:48
uint64_t node
Node type. See Node / Vertex page for further details.
Definition basic_types.hpp:51