45#include <lal/graphs/rooted_tree.hpp>
46#include <lal/generate/tree_generator.hpp>
47#include <lal/detail/array.hpp>
141 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
graphs::rooted_tree get_tree() noexcept
Definition tree_generator.hpp:196
Exhaustive enumeration of unlabelled rooted trees.
Definition all_ulab_rooted_trees.hpp:99
detail::array< node > m_save
Sequence SAVE.
Definition all_ulab_rooted_trees.hpp:218
uint64_t m_p
Pointer as in the paper.
Definition all_ulab_rooted_trees.hpp:216
void next() noexcept
Generates the next tree.
all_ulab_rooted_trees() noexcept
Empty constructor.
Definition all_ulab_rooted_trees.hpp:104
bool end() const noexcept
Returns true if the end of the iteration was reached.
Definition all_ulab_rooted_trees.hpp:165
graphs::rooted_tree yield_tree() noexcept
Yields a tree, advancing the generator if necessary.
Definition all_ulab_rooted_trees.hpp:188
void clear() noexcept
Clears the memory used.
Definition all_ulab_rooted_trees.hpp:155
all_ulab_rooted_trees(all_ulab_rooted_trees &&Gen) noexcept=default
Move constructor.
bool m_reached_end
Has the end of the generation been reached?
Definition all_ulab_rooted_trees.hpp:213
graphs::rooted_tree __get_tree() noexcept
Constructs the current tree.
void reset() noexcept
Sets the generator to its initial state.
Definition all_ulab_rooted_trees.hpp:183
void __reset() noexcept
Sets the generator to its initial state.
all_ulab_rooted_trees(const all_ulab_rooted_trees &Gen) noexcept=default
Copy constructor.
detail::array< node > m_L
Level sequence of the tree.
Definition all_ulab_rooted_trees.hpp:222
detail::array< node > m_prev
Sequence PREV.
Definition all_ulab_rooted_trees.hpp:220
bool m_is_last
Is the current tree the last tree to be generated?
Definition all_ulab_rooted_trees.hpp:209
void init(const uint64_t n) noexcept
Initializes the generator with a given number of vertices.
Definition all_ulab_rooted_trees.hpp:141
bool m_is_first
Is the current tree the first tree to be generated?
Definition all_ulab_rooted_trees.hpp:211
all_ulab_rooted_trees(const uint64_t n) noexcept
Constructor with number of nodes.
Definition all_ulab_rooted_trees.hpp:111
~all_ulab_rooted_trees() noexcept=default
Default destructor.
Rooted tree graph class.
Definition rooted_tree.hpp:109
Main namespace of the library.
Definition basic_types.hpp:48
uint64_t node
Node type. See Node / Vertex page for further details.
Definition basic_types.hpp:51
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