LAL: Linear Arrangement Library 21.07.01
A library focused on algorithms on linear arrangements of graphs.
|
Uniformly random generation of projective arrangements of a labeled rooted tree. More...
#include <rand_projective_arrangements.hpp>
Public Member Functions | |
rand_projective_arrangements (const graphs::rooted_tree &rT, uint32_t seed=0) noexcept | |
Constructor with tree. | |
rand_projective_arrangements (const rand_projective_arrangements &Gen)=default | |
Default copy constructor. | |
rand_projective_arrangements (rand_projective_arrangements &&Gen)=default | |
Default move constructor. | |
~rand_projective_arrangements ()=default | |
Default destructor. | |
linear_arrangement | get_arrangement () noexcept |
Make a random projective arrangement of a rooted tree. | |
linear_arrangement | yield_arrangement () noexcept |
Returns a random projective arrangement. | |
Private Attributes | |
const graphs::rooted_tree & | m_rT |
The rooted tree of which we are making projective arrangements uniformly at random. | |
std::vector< std::vector< node > > | m_rdata |
The random data for all vertices. | |
std::mt19937 | m_gen |
Random number generator. | |
Uniformly random generation of projective arrangements of a labeled rooted tree.
A projective arrangement of a directed rooted tree is one in which the root is not covered by any of the tree's edges and there are no edge crossings.
An example of usage of this class is
Equivalently,
|
noexcept |
Constructor with tree.
rT | Input rooted tree |
seed | The seed used for the random generator. If the seed is 0 then a random seed is generated and used. |
|
default |
Default copy constructor.
Gen | Random projective arrangement generator. |
|
default |
Default move constructor.
Gen | Random projective arrangement generator. |
|
noexcept |
Make a random projective arrangement of a rooted tree.
|
private |
The random data for all vertices.
This is a member of the class to avoid its initialisation at every call to get_arrangement.