55#include <lal/graphs/free_tree.hpp>
56#include <lal/detail/linarr/Dmin_utils.hpp>
57#include <lal/detail/linarr/Dopt_utils.hpp>
58#include <lal/detail/pairs_utils.hpp>
78template <
bool make_arrangement>
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;
113 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:452
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: Dmin_Planar_AEF.hpp:84
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
std::pair< node, node > centroidal_vertex_plus_adjacency_list(const tree_t &t, node x, std::vector< std::vector< node_size > > &L) noexcept
Calculates the centroid and the corresponding rooted adjacency list.
Definition: tree_centroid.hpp:343
Main namespace of the library.
Definition: basic_types.hpp:50
uint64_t node
Node type. See Node / Vertex page for further details.
Definition: basic_types.hpp:53