45#include <lal/basic_types.hpp>
46#include <lal/graphs/free_tree.hpp>
47#include <lal/generate/tree_generator.hpp>
48#include <lal/detail/data_array.hpp>
140 void init(uint64_t n)
noexcept {
Base class for tree generators.
Definition: tree_generator.hpp:123
uint64_t m_n
Number of vertices.
Definition: tree_generator.hpp:296
void init(uint64_t n) noexcept
Initializes the tree generator.
Definition: tree_generator.hpp:159
void clear() noexcept
Clears the memory used by the generator.
Definition: tree_generator.hpp:165
void activate_all_postprocessing_actions() noexcept
Activates all postprocessing actions.
Definition: tree_generator.hpp:242
graphs::free_tree get_tree() noexcept
Retrieve the generated tree.
Definition: tree_generator.hpp:195
Exhaustive enumeration of labelled free trees.
Definition: all_lab_free_trees.hpp:99
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
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
detail::data_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
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
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.
detail::data_array< uint64_t > m_Prufer_seq
Prüfer sequence.
Definition: all_lab_free_trees.hpp:256
uint64_t m_L
Left-most position with value .
Definition: all_lab_free_trees.hpp:254
all_lab_free_trees(const all_lab_free_trees &Gen)=default
Copy constructor.
void next() noexcept
Generates next tree.
Definition: all_lab_free_trees.hpp:171
all_lab_free_trees(uint64_t n) noexcept
Constructor with number of nodes.
Definition: all_lab_free_trees.hpp:110
void init(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
all_lab_free_trees(all_lab_free_trees &&Gen)=default
Move constructor.
Free tree graph class.
Definition: free_tree.hpp:60
Main namespace of the library.
Definition: basic_types.hpp:50
Wrapper of a C array for autmatic deallocation of memory.
Definition: data_array.hpp:59
void fill(const T &v) noexcept
Assign the same value to every element in the data.
Definition: data_array.hpp:263
std::size_t size() const noexcept
Size of the array.
Definition: data_array.hpp:204
void resize(std::size_t new_size) noexcept
Resize the array.
Definition: data_array.hpp:175
void clear() noexcept
Clear the contents of the array.
Definition: data_array.hpp:162
T * end() noexcept
Non-constant raw pointer to last+1 element.
Definition: data_array.hpp:293
T * begin() noexcept
Non-constant raw pointer to first element.
Definition: data_array.hpp:291