45#include <lal/graphs/undirected_graph.hpp>
46#include <lal/graphs/tree.hpp>
151 (
node s,
node t,
bool norm =
true,
bool check_norm =
true) noexcept;
199 (const std::vector<
edge>& edges,
bool norm = true,
bool check_norm = true)
229 (const std::vector<
edge>& edges,
bool norm = true,
bool check_norm = true)
252 (
node u,
bool norm = true,
bool check_norm = true)
272 inline
bool is_rooted() const noexcept {
return false; }
318 virtual
void _init(uint32_t n) noexcept;
325 uint32_t * const root_of,
326 uint32_t * const root_size
330 uint32_t * const root_of,
331 uint32_t * const root_size
335 uint32_t * const root_of,
336 uint32_t * const root_size
340 uint32_t * const root_of,
341 uint32_t * const root_size
Free tree graph class.
Definition free_tree.hpp:59
free_tree & add_edge(node s, node t, bool norm=true, bool check_norm=true) noexcept
Adds an edge to the tree.
void copy_full_free_tree(const free_tree &f) noexcept
Copies all members of this class and the parent class.
void calculate_tree_type() noexcept
Calculates the type of tree.
free_tree & add_edges(const std::vector< edge > &edges, bool norm=true, bool check_norm=true) noexcept
Adds a list of edges to the graph.
free_tree(free_tree &&t) noexcept
Move constructor.
Definition free_tree.hpp:84
free_tree & add_edge_bulk(node s, node t) noexcept
Adds an edge to the graph.
virtual free_tree & remove_edges_incident_to(node u, bool norm=true, bool check_norm=true) noexcept
Remove all edges incident to a given vertex.
free_tree & set_edges(const std::vector< edge > &edges, bool norm=true, bool check_norm=true) noexcept
Sets the edges to the graph.
free_tree(uint32_t n) noexcept
Constructor with number of vertices.
Definition free_tree.hpp:69
void move_full_free_tree(free_tree &&f) noexcept
Moves all members of this class and the parent class.
void call_union_find_after_add(node u, node v, uint32_t *const root_of, uint32_t *const root_size) noexcept
A call to the union find method.
head_vector get_head_vector(node r=0) const noexcept
Converts a free tree into a head vector.
free_tree(const undirected_graph &t) noexcept
Copy constructor with undirected graph.
void call_union_find_after_remove(node u, node v, uint32_t *const root_of, uint32_t *const root_size) noexcept
A call to the union find method.
void disjoint_union(const free_tree &t) noexcept
Disjoint union of trees.
virtual void _clear() noexcept
virtual void _init(uint32_t n) noexcept
free_tree(const free_tree &t) noexcept
Copy constructor.
Definition free_tree.hpp:76
void finish_bulk_add(bool norm=true, bool check=true) noexcept
Finishes adding edges in bulk.
free_tree & operator=(const free_tree &f) noexcept
Copy assignment operator.
Definition free_tree.hpp:113
virtual ~free_tree() noexcept
Destructor.
Definition free_tree.hpp:104
free_tree(undirected_graph &&t) noexcept
Move constructor with undirected graph.
bool is_rooted() const noexcept
Returns whether this tree is a rooted tree.
Definition free_tree.hpp:272
free_tree() noexcept
Empty constructor.
Definition free_tree.hpp:64
graph() noexcept
Empty constructor.
Definition graph.hpp:74
Tree graph class.
Definition tree.hpp:73
tree() noexcept
Empty constructor.
Definition tree.hpp:78
void tree_only_init(uint32_t n) noexcept
Initialises only the memory of class tree.
Undirected graph class.
Definition undirected_graph.hpp:67
undirected_graph() noexcept
Empty constructor.
Definition undirected_graph.hpp:72
Main namespace of the library.
Definition definitions.hpp:48
std::pair< node, node > edge
Edge type.
Definition definitions.hpp:75
uint32_t node
Node type.
Definition definitions.hpp:51
std::vector< uint32_t > head_vector
A head vector representation of a (usually) rooted tree.
Definition definitions.hpp:114