45#include <lal/linear_arrangement.hpp>
46#include <lal/graphs/undirected_graph.hpp>
47#include <lal/graphs/tree.hpp>
141 const bool norm =
true,
142 const bool check_norm =
true
171 const
bool norm = true,
172 const
bool check_norm = true
224 const std::vector<
edge>& edges,
225 const
bool norm = true,
226 const
bool check_norm = true
259 const std::vector<
edge>& edges,
260 const
bool norm = true,
261 const
bool check_norm = true
286 const
bool norm = false,
287 const
bool check_norm = true
337 const std::vector<
edge>& edges,
338 const
bool norm = true,
339 const
bool check_norm = true
362 const
bool norm = true,
363 const
bool check_norm = true
414 void _init(
const uint64_t n)
noexcept {
449 uint64_t * const root_of,
450 uint64_t * const root_size
457 uint64_t * const root_of,
458 uint64_t * const root_size
464 uint64_t * const root_of,
465 uint64_t * const root_size
473 uint64_t * const root_of,
474 uint64_t * const root_size
481 uint64_t * const root_of,
482 uint64_t * const root_size
488 uint64_t * const root_of,
489 uint64_t * const root_size
495 uint64_t * const root_of,
496 uint64_t * const root_size
Free tree graph class.
Definition free_tree.hpp:60
void update_union_find_after_remove_edges(const edge_list &edges, uint64_t *const root_of, uint64_t *const root_size) const noexcept
Update the union find data structure after the removal of a set of edges.
void copy_full_free_tree(const free_tree &f) noexcept
Copies all members of this class and the parent classes.
Definition free_tree.hpp:501
free_tree & remove_edges(const std::vector< edge > &edges, const bool norm=true, const bool check_norm=true) noexcept
Remove an edge from this graph.
void calculate_tree_type() noexcept
Calculates the type of tree.
void update_union_find_after_add_edges_bulk(uint64_t *const root_of, uint64_t *const root_size) const noexcept
Update the union find data structure after the addition of several edges.
void _clear() noexcept
Clears the memory in the graph hierarchy.
Definition free_tree.hpp:424
void finish_bulk_remove_complete(const bool norm=true, const bool check=true) noexcept
Completes the inner structure of the tree after removing edges in bulk.
void finish_bulk_remove(const bool norm=true, const bool check=true) noexcept
Finishes removing edges in bulk.
free_tree(free_tree &&t) noexcept
Move constructor.
Definition free_tree.hpp:90
void finish_bulk_add(const bool norm=true, const bool check=true) noexcept
Finishes adding edges in bulk.
free_tree & remove_edges_incident_to(const node u, const bool norm=true, const bool check_norm=true) noexcept
Remove all edges incident to a given vertex.
free_tree & disjoint_union(const free_tree &t) noexcept
Disjoint union of trees.
free_tree & set_edges(const std::vector< edge > &edges, const bool norm=true, const 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 classes.
Definition free_tree.hpp:511
void actions_after_remove_edges(const edge_list &e) noexcept
Do some extra work after the removal of several edges.
~free_tree() noexcept
Destructor.
Definition free_tree.hpp:109
void actions_before_remove_edges_incident_to(const node u) noexcept
Do some work before all edges incident to a node is removed.
free_tree(const undirected_graph &t) noexcept
Copy constructor with undirected graph.
head_vector get_head_vector(const node r=0, const linear_arrangement &arr={}) const noexcept
Converts a free tree into a head vector.
void _init(const uint64_t n) noexcept
Initializes the memory in the graph hierarchy.
Definition free_tree.hpp:414
void actions_after_add_edges_bulk() noexcept
Do some extra work after the addition of several edges in bulk.
free_tree & remove_edge_bulk(const node s, const node t) noexcept
Removes an edge from the tree.
void update_union_find_after_remove_edge(const node u, const node v, uint64_t *const root_of, uint64_t *const root_size) const noexcept
Update the union find data structure after an edge removal.
free_tree(const uint64_t n) noexcept
Constructor with number of vertices.
Definition free_tree.hpp:75
free_tree(const free_tree &t) noexcept
Copy constructor.
Definition free_tree.hpp:82
void actions_after_add_edges(const edge_list &e) noexcept
Do some extra work after the addition of several edges.
void update_union_find_after_remove_edges_bulk(uint64_t *const root_of, uint64_t *const root_size) const noexcept
Update the union find data structure after the removal of several edges.
free_tree & add_edges(const std::vector< edge > &edges, const bool norm=true, const bool check_norm=true) noexcept
Adds a list of edges to the graph.
free_tree & operator=(const free_tree &f) noexcept
Copy assignment operator.
Definition free_tree.hpp:117
void update_union_find_after_add_edge(const node u, const 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 update_union_find_after_add_edges(const edge_list &edges, uint64_t *const root_of, uint64_t *const root_size) const noexcept
Update the union find data structure after the addition of a set of edges.
free_tree & remove_node(const node u, const bool norm=true, const bool check_norm=true) noexcept
Remove a node from this graph.
free_tree & add_node() noexcept
Adds a vertex to the graph.
Definition free_tree.hpp:132
void actions_after_remove_edge(const node u, const node v) noexcept
Do some extra work after the removal of an edge.
void update_union_find_before_remove_incident_edges_to(const 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.
void actions_after_add_edge(const node u, const node v) noexcept
Do some extra work after the addition of an edge.
free_tree & add_edge_bulk(const node s, const node t) noexcept
Adds an edge to the tree.
void actions_after_remove_node(const node u) noexcept
Do some work before the removal of a vertex.
free_tree(undirected_graph &&t) noexcept
Move constructor with undirected graph.
void finish_bulk_add_complete(const bool norm=true, const bool check=true) noexcept
Completes the inner structure of the tree after adding edges in bulk.
free_tree & remove_edge(const node s, const node t, const bool norm=false, const bool check_norm=true) noexcept
Remove an edge from this graph.
bool is_rooted() const noexcept
Returns whether this tree is a rooted tree.
Definition free_tree.hpp:390
free_tree() noexcept
Empty constructor.
Definition free_tree.hpp:70
free_tree & add_edge(const node s, const node t, const bool norm=true, const bool check_norm=true) noexcept
Adds an edge to the tree.
void actions_after_remove_edges_bulk() noexcept
Do some extra work after the removal of several edges in bulk.
graph() noexcept
Empty constructor.
Definition graph.hpp:73
Rooted tree graph class.
Definition rooted_tree.hpp:109
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:359
void tree_only_move(tree &&t) noexcept
Moves only members of class tree.
Definition tree.hpp:367
void tree_only_add_node() noexcept
Adds a node to this tree.
Definition tree.hpp:382
void tree_only_init(const uint64_t n) noexcept
Initializes only the memory of class tree.
Definition tree.hpp:340
void tree_only_clear() noexcept
Clears the memory used by only class tree.
Definition tree.hpp:351
Undirected graph class.
Definition undirected_graph.hpp:66
virtual void _clear() noexcept
Clears the memory of undirected_graph and graph classes.
Definition undirected_graph.hpp:413
void copy_full_undirected_graph(const undirected_graph &u) noexcept
Copies all members of this class and the parent class.
Definition undirected_graph.hpp:434
void move_full_undirected_graph(undirected_graph &&u) noexcept
Moves all members of this class and the parent class.
Definition undirected_graph.hpp:441
virtual void _init(const uint64_t n) noexcept
Initializes the memory in the graph hierarchy.
Definition undirected_graph.hpp:409
virtual undirected_graph & add_node() noexcept
Adds a vertex to the graph.
Definition undirected_graph.hpp:135
undirected_graph & disjoint_union(const undirected_graph &g) noexcept
Disjoint union of graphs.
undirected_graph() noexcept
Empty constructor.
Definition undirected_graph.hpp:71
Linear arrangement of vertices.
Definition linear_arrangement.hpp:103
Main namespace of the library.
Definition basic_types.hpp:48
std::vector< uint64_t > head_vector
See Head vector page for further details.
Definition basic_types.hpp:58
std::pair< node, node > edge
See Edge page for further details.
Definition basic_types.hpp:56
std::vector< edge > edge_list
See Edge list page for further details.
Definition basic_types.hpp:60
uint64_t node
Node type. See Node / Vertex page for further details.
Definition basic_types.hpp:51