LAL: Linear Arrangement Library 24.10.00
A library focused on algorithms on linear arrangements of graphs.
Loading...
Searching...
No Matches
lal::detail::DMax::thistle_1 Namespace Reference

In arrangements with only 1 thistle. More...

Namespaces

namespace  bits
 Details of algorithm for 1-Thistle MaxLA.
 

Functions

template<bool make_arrangement>
bits::result_t< make_arrangement > AEF (const graphs::free_tree &t, const std::vector< properties::branchless_path > &all_paths, const array< std::size_t > &node_to_path) noexcept
 Maximal non-bipartite Arrangement with exactly 1 thistle vertex.
 
template<bool make_arrangement>
std::conditional_t< make_arrangement, std::pair< uint64_t, linear_arrangement >, uint64_t > AEF (const graphs::free_tree &t, const std::vector< properties::branchless_path > &all_paths) noexcept
 Maximal non-bipartite Arrangement with exactly 1 thistle vertex.
 

Detailed Description

In arrangements with only 1 thistle.

Function Documentation

◆ AEF() [1/2]

template<bool make_arrangement>
std::conditional_t< make_arrangement, std::pair< uint64_t, linear_arrangement >, uint64_t > lal::detail::DMax::thistle_1::AEF ( const graphs::free_tree & t,
const std::vector< properties::branchless_path > & all_paths )
inlinenodiscardnoexcept

Maximal non-bipartite Arrangement with exactly 1 thistle vertex.

This function implements the algorithm in [7].

Template Parameters
make_arrangementBoolean value that indicates whether or not the maximal arrangement should be constructed.
Parameters
tInput tree.
all_pathsThe set of all paths that span sequences of vertices of degree 2.
Returns
The cost of a maximal non-bipartite arrangement with exactly 1 thistle vertex.
Precondition
Input tree t must be a valid tree (see lal::graphs::tree::is_tree).

◆ AEF() [2/2]

template<bool make_arrangement>
bits::result_t< make_arrangement > lal::detail::DMax::thistle_1::AEF ( const graphs::free_tree & t,
const std::vector< properties::branchless_path > & all_paths,
const array< std::size_t > & node_to_path )
inlinenodiscardnoexcept

Maximal non-bipartite Arrangement with exactly 1 thistle vertex.

This function implements the algorithm in [7].

Template Parameters
make_arrangementBoolean value that indicates whether or not the maximal arrangement should be constructed.
Parameters
tInput tree.
all_pathsThe set of all paths that span sequences of vertices of degree 2.
node_to_pathAn index array that points every degree-2 vertex to its path in all_paths.
Returns
The cost of a maximal non-bipartite arrangement with exactly 1 thistle vertex.