48#include <lal/linear_arrangement.hpp>
49#include <lal/graphs/graph.hpp>
50#include <lal/properties/bipartite_graph_coloring.hpp>
51#include <lal/properties/bipartite_graph_colorability.hpp>
96 template <
class graph_t>
98 static_assert(std::is_base_of_v<graphs::graph, graph_t>);
155 void init(
const uint64_t seed)
noexcept;
Random generation of arrangements of any bipartite graph.
Definition rand_bipartite_arrangements.hpp:84
rand_bipartite_arrangements(rand_bipartite_arrangements &&Gen) noexcept=default
Default move constructor.
const linear_arrangement & yield_arrangement() noexcept
Returns a linear arrangement constructed uniformly at random.
Definition rand_bipartite_arrangements.hpp:143
const linear_arrangement & get_arrangement() noexcept
Returns a linear arrangement constructed uniformly at random.
rand_bipartite_arrangements(properties::bipartite_graph_coloring &&c, const uint64_t seed=0) noexcept
Constructor with coloring.
Definition rand_bipartite_arrangements.hpp:132
void init_arrangement(const bool red_first) noexcept
Initializes this class.
std::bernoulli_distribution m_red_or_blue
Boolean values generator.
Definition rand_bipartite_arrangements.hpp:179
linear_arrangement m_arr
The arrangement generated by this class.
Definition rand_bipartite_arrangements.hpp:186
std::mt19937 m_gen
Random number generator.
Definition rand_bipartite_arrangements.hpp:173
void init(const uint64_t seed) noexcept
Initializes this class.
rand_bipartite_arrangements(const properties::bipartite_graph_coloring &c, const uint64_t seed=0) noexcept
Constructor with coloring.
Definition rand_bipartite_arrangements.hpp:120
std::size_t m_n_red
Number of red vertices.
Definition rand_bipartite_arrangements.hpp:170
properties::bipartite_graph_coloring m_coloring
Coloring of the bipartite graph.
Definition rand_bipartite_arrangements.hpp:189
rand_bipartite_arrangements(const graph_t &g, const uint64_t seed=0) noexcept
Constructor with graph.
Definition rand_bipartite_arrangements.hpp:97
std::size_t m_n_blue
Number of blue vertices.
Definition rand_bipartite_arrangements.hpp:168
properties::bipartite_graph_coloring::color_t m_what_in_left
What color do we find in the left half?
Definition rand_bipartite_arrangements.hpp:192
rand_bipartite_arrangements(const rand_bipartite_arrangements &Gen) noexcept=default
Default copy constructor.
Linear arrangement of vertices.
Definition linear_arrangement.hpp:103
A class to represent a coloring of the vertices of a bipartite graph.
Definition bipartite_graph_coloring.hpp:60
uint64_t color_t
A useful type for colors.
Definition bipartite_graph_coloring.hpp:68
static constexpr color_t red
A color, called red, of value 0.
Definition bipartite_graph_coloring.hpp:72
static constexpr color_t blue
A color, called blue, of value 1.
Definition bipartite_graph_coloring.hpp:74
bipartite_graph_coloring bipartite_coloring(const graphs::undirected_graph &g) noexcept
Calculates the coloring of a bipartite graph.
Main namespace of the library.
Definition basic_types.hpp:48