Uniformly random selection of labelled rooted trees.
More...
#include <rand_lab_rooted_trees.hpp>
|
_rand_lab_rooted_trees | m_Gen |
| See _rand_lab_rooted_trees for details.
|
|
uint64_t | m_n |
| Number of vertices.
|
|
bool | m_normalize_tree |
| Normalize the generated tree.
|
|
bool | m_calculate_size_subtrees |
| Calculate the size of the subtrees of the generated rooted tree.
|
|
bool | m_calculate_tree_type |
| Calculate the type of tree of the generated tree.
|
|
|
static constexpr bool | is_free |
| Helpful Boolean value to compact 'if constexpr' expressions.
|
|
Uniformly random selection of labelled rooted trees.
This is a wrapper class of _rand_lab_rooted_trees. Users should refrain from using said class. However, users will find the implementation details (as for algorithms and citations) in the documentation of said class.
An example of usage of this class is
for (int i = 0; i < 100; ++i) {
}
Uniformly random selection of labelled rooted trees.
Definition rand_lab_rooted_trees.hpp:153
Rooted tree graph class.
Definition rooted_tree.hpp:109
Equivalently,
for (int i = 0; i < 100; ++i) {
}
◆ rand_lab_rooted_trees() [1/3]
lal::generate::rand_lab_rooted_trees::rand_lab_rooted_trees |
( |
const uint64_t | n, |
|
|
const uint64_t | seed = 0 ) |
|
inlinenoexcept |
Constructor with size of tree and seed for the random number generator.
In case the seed given is '0', a random seed will be generated.
- Parameters
-
n | Number of nodes. |
seed | The seed used for the random generator. If the seed is 0 then a random seed is generated and used. |
◆ rand_lab_rooted_trees() [2/3]
Copy constructor.
- Parameters
-
Gen | Random labelled rooted tree generator. |
◆ rand_lab_rooted_trees() [3/3]
Move constructor.
- Parameters
-
Gen | Random labelled rooted tree generator. |
◆ __get_tree()
|
inlinenodiscardprotectedvirtualnoexcept |
◆ activate_all_postprocessing_actions()
Activates all postprocessing actions.
The full list of postprocessing actions can be found in the documentation of this class.
◆ deactivate_all_postprocessing_actions()
Deactivates all postprocessing actions.
The full list of postprocessing actions can be found in the documentation of this class.
◆ get_tree()
|
inlinenodiscardnoexceptinherited |
Retrieve the generated tree.
This function first calls __get_tree and then modifies the generated tree according to the values:
- Returns
- A free/rooted tree depending on the type of the class inheriting from this. The type of generation of tree differs from one type of class to another.
◆ init()
void lal::generate::rand_lab_rooted_trees::init |
( |
const uint64_t | n, |
|
|
const uint64_t | seed = 0 ) |
|
inlinenoexcept |
Initializes the generator with the number of nodes and a seed.
- Parameters
-
n | Number of nodes. |
seed | The seed used for the random generator. If the seed is 0 then a random seed is generated and used. |
◆ set_calculate_size_subtrees()
Should the size of the subtrees be calculated?
- Parameters
-
◆ set_calculate_tree_type()
Should the tree be classified into types?
See lal::graphs::tree_type for details on the classification.
- Parameters
-
◆ set_normalize_tree()
Should trees be normalized?
- Parameters
-
◆ yield_tree()
|
inlinenodiscardvirtualnoexcept |
Yields a tree, advancing the generator if necessary.
In case the class that inherits from this one is exhaustive then this function also moves the generator forward with its appropriate method. If the class is random, then it just calls get_tree().
- Returns
- A free/rooted tree depending on the type of the class inheriting from this. The type of generation of tree differs from one type of class to another.
- Postcondition
- The generator advances to the next tree.
Implements lal::generate::_tree_generator< graphs::rooted_tree >.
The documentation for this class was generated from the following file: