45#include <lal/graphs/free_tree.hpp>
46#include <lal/generate/tree_generator.hpp>
47#include <lal/detail/array.hpp>
137 void init(const uint64_t n) noexcept {
196 detail::array<uint64_t>
m_L;
201 detail::array<uint64_t>
m_W;
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
graphs::free_tree get_tree() noexcept
Definition tree_generator.hpp:196
Exhaustive enumeration of unlabelled free trees.
Definition all_ulab_free_trees.hpp:99
bool m_reached_end
Has the end of the generation been reached?
Definition all_ulab_free_trees.hpp:231
all_ulab_free_trees(const uint64_t n) noexcept
Constructor with number of nodes.
Definition all_ulab_free_trees.hpp:108
void reset() noexcept
Sets the generator to its initial state.
Definition all_ulab_free_trees.hpp:171
all_ulab_free_trees() noexcept
Empty constructor.
Definition all_ulab_free_trees.hpp:102
uint64_t m_q
Largest integer such that .
Definition all_ulab_free_trees.hpp:206
void __reset() noexcept
Sets the generator to its initial state.
uint64_t m_p
Largest integer such that .
Definition all_ulab_free_trees.hpp:204
bool end() const noexcept
Returns true if the end of the iteration was reached.
Definition all_ulab_free_trees.hpp:157
bool m_is_last
Was the last tree generated?
Definition all_ulab_free_trees.hpp:227
bool m_first_it
First time calling next().
Definition all_ulab_free_trees.hpp:229
void init(const uint64_t n) noexcept
Initializes the generator with a given number of vertices.
Definition all_ulab_free_trees.hpp:137
void clear() noexcept
Clears the memory used.
Definition all_ulab_free_trees.hpp:148
uint64_t m_h1
Maximum level number in the first principal subsequence.
Definition all_ulab_free_trees.hpp:209
detail::array< uint64_t > m_L
Canonical level sequence of the tree.
Definition all_ulab_free_trees.hpp:196
graphs::free_tree yield_tree() noexcept
Yields a tree, advancing the generator if necessary.
Definition all_ulab_free_trees.hpp:176
uint64_t m_h2
Maximum level number in the second principal subsequence.
Definition all_ulab_free_trees.hpp:211
~all_ulab_free_trees() noexcept=default
Default destructor.
all_ulab_free_trees(all_ulab_free_trees &&Gen) noexcept=default
Move constructor.
uint64_t m_r
Exactly .
Definition all_ulab_free_trees.hpp:224
void next() noexcept
Generates next tree.
detail::array< uint64_t > m_W
is the subscript of the level number in corresponding to the parent of the node corresponding to .
Definition all_ulab_free_trees.hpp:201
graphs::free_tree __get_tree() noexcept
Constructs the current tree.
uint64_t m_c
An index to the first element of .
Definition all_ulab_free_trees.hpp:218
all_ulab_free_trees(const all_ulab_free_trees &Gen) noexcept=default
Copy constructor.
Free tree graph class.
Definition free_tree.hpp:60
Main namespace of the library.
Definition basic_types.hpp:48
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