51#include <lal/linear_arrangement.hpp>
52#include <lal/graphs/free_tree.hpp>
53#include <lal/detail/linarr/level_signature.hpp>
58namespace unconstrained {
124 (
const std::size_t i)
198 m_amount = std::move(max_arrs.m_amount);
203 for (std::size_t i = 0; i < max_arrs.m_representatives.size(); ++i) {
215 m_amount.push_back(max_arrs.m_amount[i]);
234 const bool isomorphic =
238 if (isomorphic) {
return i; }
Set of maximum arrangements up to isomorphism.
Definition set_maximum_arrangements.hpp:70
void merge(set_maximum_arrangements &&max_arrs) noexcept
Merges another set of maximum arrangements into this one.
Definition set_maximum_arrangements.hpp:181
const level_signature_per_position & get_level_signature(const std::size_t i) const noexcept
Returns the level signature of the i-th representative.
Definition set_maximum_arrangements.hpp:124
static constexpr level_signature_type per_position
Typedef to write less.
Definition set_maximum_arrangements.hpp:73
const linear_arrangement & get_representative(const std::size_t i) const noexcept
Returns the i-th representative.
Definition set_maximum_arrangements.hpp:113
std::vector< level_signature_per_position > m_level_signatures
List of level signatures per representatives.
Definition set_maximum_arrangements.hpp:255
std::size_t find_representative(const level_signature_per_position &L) const noexcept
Find the level signature isomorphic to L.
Definition set_maximum_arrangements.hpp:228
std::size_t get_size_class(const std::size_t i) const noexcept
Returns the multiplicity of the i-th representative.
Definition set_maximum_arrangements.hpp:105
uint64_t get_max_value() const noexcept
Returns the maximum value found so far.
Definition set_maximum_arrangements.hpp:90
const graphs::free_tree & m_t
The tree for which the arrangements are stored.
Definition set_maximum_arrangements.hpp:246
std::vector< uint64_t > m_amount
Multiplicities of each representative.
Definition set_maximum_arrangements.hpp:257
std::vector< linear_arrangement > m_representatives
List of representative arrangements.
Definition set_maximum_arrangements.hpp:251
void init() noexcept
Initialize the object.
Definition set_maximum_arrangements.hpp:83
~set_maximum_arrangements() noexcept
Destructor.
Definition set_maximum_arrangements.hpp:80
std::size_t get_num_representatives() const noexcept
Returns the number of representatives.
Definition set_maximum_arrangements.hpp:94
uint64_t m_max_value
Maximum value found.
Definition set_maximum_arrangements.hpp:249
std::vector< linear_arrangement > && retrieve_all_representatives() noexcept
Returns the set of representatives.
Definition set_maximum_arrangements.hpp:98
void add(const uint64_t value, const linear_arrangement &arr) noexcept
Adds a new arrangement to this class.
Definition set_maximum_arrangements.hpp:143
std::vector< level_signature_per_position > m_mirrored_level_signatures
List of mirrored level signatures per representatives.
Definition set_maximum_arrangements.hpp:253
set_maximum_arrangements(const graphs::free_tree &t) noexcept
Constructor bound to a free tree.
Definition set_maximum_arrangements.hpp:77
A class that implements level signatures of an array.
Definition level_signature.hpp:90
Free tree graph class.
Definition free_tree.hpp:60
Linear arrangement of vertices.
Definition linear_arrangement.hpp:103
level_signature_type
Types of level signature.
Definition level_signature.hpp:58
@ per_position
Given per position.
void calculate_level_signature(const graph_t &g, const linear_arrangement &arr, level_signature< t > &L) noexcept
Calculates the level signature of an arrangement of a graph.
Definition level_signature.hpp:308
level_signature_t mirror_level_signature(const level_signature_t &L) noexcept
Mirrors a level signature.
Definition level_signature.hpp:376
Main namespace of the library.
Definition basic_types.hpp:48