45#include <lal/basic_types.hpp>
46#include <lal/detail/array.hpp>
103 void init(std::size_t n)
noexcept {
A class to represent a coloring of the vertices of a bipartite graph.
Definition bipartite_graph_coloring.hpp:60
std::size_t size() const noexcept
Returns the size of this m_coloring (the number of vertices)
Definition bipartite_graph_coloring.hpp:113
detail::array< color_t > m_coloring
The array that contains the m_coloring.
Definition bipartite_graph_coloring.hpp:136
bipartite_graph_coloring() noexcept=default
Default constructor.
color_t get_color_of(node u) const noexcept
Returns the color of node u.
Definition bipartite_graph_coloring.hpp:116
void init(std::size_t n) noexcept
Initializes this object with n vertices.
Definition bipartite_graph_coloring.hpp:103
static constexpr color_t invalid_color
An invalid color, used to initialize colors to an invalid value.
Definition bipartite_graph_coloring.hpp:70
uint64_t color_t
A useful type for colors.
Definition bipartite_graph_coloring.hpp:68
color_t operator[](node u) const noexcept
Returns the color of node u.
Definition bipartite_graph_coloring.hpp:121
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
bool is_color_valid(node u) const noexcept
Returns whether or not the color of vertex u is valid.
Definition bipartite_graph_coloring.hpp:108
color_t & get_color_of(node u) noexcept
Returns the color of node u.
Definition bipartite_graph_coloring.hpp:118
~bipartite_graph_coloring()=default
Default destrutor.
Main namespace of the library.
Definition basic_types.hpp:48
uint64_t node
Node type. See Node / Vertex page for further details.
Definition basic_types.hpp:51
Wrapper of a C array for automatic deallocation of memory.
Definition array.hpp:59
std::size_t size() const noexcept
Size of the array.
Definition array.hpp:215
void resize(const std::size_t new_size) noexcept
Resize the array.
Definition array.hpp:187
Typesafe node type.
Definition basic_types.hpp:70