45#include <lal/basic_types.hpp>
46#include <lal/graphs/free_tree.hpp>
47#include <lal/generate/tree_generator.hpp>
48#include <lal/detail/array.hpp>
140 void init(
const uint64_t n)
noexcept {
Base class for tree generators.
Definition tree_generator.hpp:123
uint64_t m_n
Definition tree_generator.hpp:300
void clear() noexcept
Clears the memory used by the generator.
Definition tree_generator.hpp:166
void init(const uint64_t n) noexcept
Initializes the tree generator.
Definition tree_generator.hpp:160
void activate_all_postprocessing_actions() noexcept
Definition tree_generator.hpp:243
graphs::free_tree get_tree() noexcept
Definition tree_generator.hpp:196
Exhaustive enumeration of labelled free trees.
Definition all_lab_free_trees.hpp:99
detail::array< uint64_t > m_Prufer_seq
Prüfer sequence.
Definition all_lab_free_trees.hpp:256
bool end() const noexcept
Returns true if the end of the iteration was reached.
Definition all_lab_free_trees.hpp:160
void clear() noexcept
Clears the memory used.
Definition all_lab_free_trees.hpp:151
detail::array< char > m_sm
If sm[i] = true iff sm[0..i-1] = true and seq[0..i] = n-2.
Definition all_lab_free_trees.hpp:258
graphs::free_tree yield_tree() noexcept
Yields a tree, advancing the generator if necessary.
Definition all_lab_free_trees.hpp:209
~all_lab_free_trees()=default
Default destructor.
void reset() noexcept
Sets the generator to its initial state.
Definition all_lab_free_trees.hpp:203
bool m_reached_end
Has the end of the generation been reached?
Definition all_lab_free_trees.hpp:260
all_lab_free_trees(all_lab_free_trees &&Gen) noexcept=default
Move constructor.
bool has_next() const noexcept
Returns whether there are more trees to generate.
Definition all_lab_free_trees.hpp:246
uint64_t m_it
Iterator on the sequence.
Definition all_lab_free_trees.hpp:252
all_lab_free_trees(const all_lab_free_trees &Gen) noexcept=default
Copy constructor.
graphs::free_tree __get_tree() noexcept
Constructs the current tree.
all_lab_free_trees & operator=(const all_lab_free_trees &g) noexcept=default
Copy assignment operator.
uint64_t m_L
Left-most position with value .
Definition all_lab_free_trees.hpp:254
all_lab_free_trees(const uint64_t n) noexcept
Constructor with number of nodes.
Definition all_lab_free_trees.hpp:110
void next() noexcept
Generates next tree.
Definition all_lab_free_trees.hpp:171
void init(const uint64_t n) noexcept
Initializes the generator with a given number of vertices.
Definition all_lab_free_trees.hpp:140
void __reset() noexcept
Sets the generator to its initial state.
Definition all_lab_free_trees.hpp:225
all_lab_free_trees() noexcept
Empty constructor.
Definition all_lab_free_trees.hpp:104
Free tree graph class.
Definition free_tree.hpp:60
Main namespace of the library.
Definition basic_types.hpp:48
Wrapper of a C array for automatic deallocation of memory.
Definition array.hpp:59
void fill(const T &v) noexcept
Assign the same value to every element in the data.
Definition array.hpp:272
T * begin() noexcept
Non-constant raw pointer to first element.
Definition array.hpp:300
T * end() noexcept
Non-constant raw pointer to last+1 element.
Definition array.hpp:302
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
void clear() noexcept
Clear the contents of the array.
Definition array.hpp:174