45#include <lal/linear_arrangement.hpp>
46#include <lal/graphs/undirected_graph.hpp>
47#include <lal/graphs/tree.hpp>
128 (
node u,
bool norm =
true,
bool check_norm =
true) noexcept;
152 (
node s,
node t,
bool norm = true,
bool check_norm = true) noexcept;
200 (const std::vector<
edge>& edges,
bool norm = true,
bool check_norm = true)
231 (const std::vector<
edge>& edges,
bool norm = true,
bool check_norm = true)
252 (
node s,
node t,
bool norm = false,
bool check_norm = true) noexcept;
276 (const std::vector<
edge>& edges,
bool norm = true,
bool check_norm = true)
300 (
node u,
bool norm = true,
bool check_norm = true)
342 virtual void _init(uint64_t n)
noexcept {
355 uint64_t *
const root_of,
356 uint64_t *
const root_size
360 uint64_t *
const root_of,
361 uint64_t *
const root_size
366 uint64_t *
const root_of,
367 uint64_t *
const root_size
371 uint64_t *
const root_of,
372 uint64_t *
const root_size
377 uint64_t *
const root_of, uint64_t *
const root_size
381 uint64_t *
const root_of, uint64_t *
const root_size
Free tree graph class.
Definition: free_tree.hpp:60
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.
Definition: free_tree.hpp:385
head_vector get_head_vector(node r=0, const linear_arrangement &arr={}) const noexcept
Converts a free tree into a head vector.
void calculate_tree_type() noexcept
Calculates the type of tree.
virtual void _init(uint64_t n) noexcept
Initialises memory of free_tree, undirected_graph and graph classes.
Definition: free_tree.hpp:342
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:85
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.
void move_full_free_tree(free_tree &&f) noexcept
Moves all members of this class and the parent class.
Definition: free_tree.hpp:395
free_tree(const undirected_graph &t) noexcept
Copy constructor with undirected graph.
free_tree & remove_edge(node s, node t, bool norm=false, bool check_norm=true) noexcept
Remove an edge from this graph.
void update_union_find_after_edge_add(node u, node v, uint64_t *const root_of, uint64_t *const root_size) const noexcept
Update the union find data structure after an edge addition.
void disjoint_union(const free_tree &t) noexcept
Disjoint union of trees.
virtual void _clear() noexcept
Definition: free_tree.hpp:348
free_tree(const free_tree &t) noexcept
Copy constructor.
Definition: free_tree.hpp:77
void finish_bulk_add(bool norm=true, bool check=true) noexcept
Finishes adding edges in bulk.
virtual free_tree & remove_node(node u, bool norm=true, bool check_norm=true) noexcept
Remove a node from this graph.
free_tree & operator=(const free_tree &f) noexcept
Copy assignment operator.
Definition: free_tree.hpp:112
virtual ~free_tree() noexcept
Destructor.
Definition: free_tree.hpp:104
void update_union_find_after_edge_add(node u, node v, uint64_t *const root_of, uint64_t *const root_size) noexcept
Update the union find data structure after an edge addition.
void update_union_find_before_incident_edges_removed(node u, uint64_t *const root_of, uint64_t *const root_size) noexcept
Update the union find data structure before the removal of all edges incident to a node.
free_tree(undirected_graph &&t) noexcept
Move constructor with undirected graph.
void update_union_find_after_edge_remove(node u, node v, uint64_t *const root_of, uint64_t *const root_size) noexcept
Update the union find data structure after an edge removal.
free_tree(uint64_t n) noexcept
Constructor with number of vertices.
Definition: free_tree.hpp:70
void update_union_find_after_edge_remove(node u, node v, uint64_t *const root_of, uint64_t *const root_size) const noexcept
Update the union find data structure after an edge removal.
bool is_rooted() const noexcept
Returns whether this tree is a rooted tree.
Definition: free_tree.hpp:326
free_tree() noexcept
Empty constructor.
Definition: free_tree.hpp:65
void update_union_find_before_incident_edges_removed(node u, uint64_t *const root_of, uint64_t *const root_size) const noexcept
Update the union find data structure before the removal of all edges incident to a node.
free_tree & remove_edges(const std::vector< edge > &edges, bool norm=true, bool check_norm=true) noexcept
Remove an edge from this graph.
Abstract class for graphs.
Definition: graph.hpp:69
Tree graph class.
Definition: tree.hpp:73
tree() noexcept
Empty constructor.
Definition: tree.hpp:78
void tree_only_copy(const tree &t) noexcept
Copies only members of class tree.
Definition: tree.hpp:327
void tree_only_move(tree &&t) noexcept
Moves only members of class tree.
Definition: tree.hpp:335
void tree_only_init(uint64_t n) noexcept
Initialises only the memory of class tree.
Definition: tree.hpp:306
void tree_only_clear() noexcept
Clears the memory used by only class tree.
Definition: tree.hpp:318
Undirected graph class.
Definition: undirected_graph.hpp:67
void disjoint_union(const undirected_graph &g) noexcept
Disjoint union of graphs.
virtual void _clear() noexcept
Clears the memory of undirected_graph and graph classes.
Definition: undirected_graph.hpp:346
void copy_full_undirected_graph(const undirected_graph &u) noexcept
Copies all members of this class and the parent class.
Definition: undirected_graph.hpp:351
void move_full_undirected_graph(undirected_graph &&u) noexcept
Moves all members of this class and the parent class.
Definition: undirected_graph.hpp:358
virtual void _init(uint64_t n) noexcept
Initialises memory of undirected_graph and graph classes.
Definition: undirected_graph.hpp:342
undirected_graph() noexcept
Empty constructor.
Definition: undirected_graph.hpp:72
Linear arrangement of vertices.
Definition: linear_arrangement.hpp:103
Main namespace of the library.
Definition: basic_types.hpp:50
std::vector< uint64_t > head_vector
See Head vector page for further details.
Definition: basic_types.hpp:64
std::pair< node, node > edge
See Edge page for further details.
Definition: basic_types.hpp:58
uint64_t node
Node type. See Node / Vertex page for further details.
Definition: basic_types.hpp:53