45#include <lal/linear_arrangement.hpp>
46#include <lal/detail/arrangement_wrapper.hpp>
69template <arrangement_type type>
78 assert(arr.size() == 0);
81 assert(arr.size() != 0);
93 template <
typename param_t>
94 [[nodiscard]] uint64_t
operator[] (
const param_t& p)
const noexcept {
96 std::is_same_v<param_t,lal::node_t> or
97 std::is_same_v<param_t,lal::position_t>
109 [[nodiscard]] std::size_t
size() const noexcept {
A wrapper to easily use identity arrangements.
Definition arrangement_wrapper.hpp:70
uint64_t operator[](const param_t &p) const noexcept
Access operator.
Definition arrangement_wrapper.hpp:94
std::size_t size() const noexcept
Returns the size of the arrangement.
Definition arrangement_wrapper.hpp:109
arrangement_wrapper(const lal::linear_arrangement &arr) noexcept
Constructor with arrangement.
Definition arrangement_wrapper.hpp:73
const lal::linear_arrangement & m_arr
Constant reference to actual arrangement.
Definition arrangement_wrapper.hpp:120
Linear arrangement of vertices.
Definition linear_arrangement.hpp:103
std::size_t size() const noexcept
Size of the arrangement (number of nodes in the arrangement).
Definition linear_arrangement.hpp:485
arrangement_wrapper< arrangement_type::nonidentity > nonidentity_arr(const linear_arrangement &arr) noexcept
Shorthand for a nonidentity arrangement.
Definition arrangement_wrapper.hpp:133
arrangement_type
Type of arrangement.
Definition arrangement_wrapper.hpp:56
@ nonidentity
Non-identity arrangement. An arrangement that is not the identity.
@ identity
Identity arrangement. .
arrangement_wrapper< arrangement_type::identity > identity_arr(const linear_arrangement &arr) noexcept
Shorthand for an identity arrangement.
Definition arrangement_wrapper.hpp:125
Main namespace of the library.
Definition basic_types.hpp:48