45#include <lal/linear_arrangement.hpp>
46#include <lal/numeric/rational.hpp>
47#include <lal/graphs/rooted_tree.hpp>
48#include <lal/graphs/free_tree.hpp>
174std::vector<dependency_flux>
Free tree graph class.
Definition: free_tree.hpp:60
Rooted tree graph class.
Definition: rooted_tree.hpp:103
free_tree to_free_tree(bool norm=true, bool check=true) const noexcept
Converts this rooted tree into a free tree (see free_tree).
bool is_rooted_tree() const noexcept
Is this tree a valid rooted tree?
Definition: rooted_tree.hpp:468
Dependency flux.
Definition: dependency_flux.hpp:58
void set_left_span(uint64_t ls) noexcept
Sets the left span.
Definition: dependency_flux.hpp:128
void set_right_span(uint64_t rs) noexcept
Sets the right span.
Definition: dependency_flux.hpp:130
double get_WS_ratio() const noexcept
Returns the W/S ratio.
Definition: dependency_flux.hpp:122
void set_dependencies(const std::vector< edge > &deps) noexcept
Sets the set of dependencies.
Definition: dependency_flux.hpp:135
uint64_t m_right_span
Definition: dependency_flux.hpp:148
void set_dependencies(std::vector< edge > &&deps) noexcept
Sets the set of dependencies.
Definition: dependency_flux.hpp:139
uint64_t & get_left_span() noexcept
Returns a reference to the left span of this flux.
Definition: dependency_flux.hpp:74
numeric::rational get_RL_ratio_rational() const noexcept
Returns the R/L ratio.
Definition: dependency_flux.hpp:94
uint64_t m_left_span
Definition: dependency_flux.hpp:145
double get_RL_ratio() const noexcept
Returns the R/L ratio.
Definition: dependency_flux.hpp:103
void set_weight(uint64_t w) noexcept
Sets the weight.
Definition: dependency_flux.hpp:132
uint64_t get_weight() const noexcept
Returns weight of this flux.
Definition: dependency_flux.hpp:71
std::vector< edge > & get_dependencies()
Returns a reference to the set of dependencies.
Definition: dependency_flux.hpp:81
uint64_t get_left_span() const noexcept
Returns left span of this flux.
Definition: dependency_flux.hpp:64
uint64_t m_weight
Weight of this flux.
Definition: dependency_flux.hpp:161
numeric::rational get_WS_ratio_rational() const noexcept
Returns the W/S ratio.
Definition: dependency_flux.hpp:113
uint64_t get_size() const noexcept
Returns the size of this flux.
Definition: dependency_flux.hpp:68
const std::vector< edge > & get_dependencies() const noexcept
Returns the set of dependencies.
Definition: dependency_flux.hpp:84
uint64_t get_right_span() const noexcept
Returns right span of this flux.
Definition: dependency_flux.hpp:66
std::vector< edge > m_dependencies
Dependencies in this flux.
Definition: dependency_flux.hpp:154
uint64_t & get_weight() noexcept
Returns a reference to the weight of this flux.
Definition: dependency_flux.hpp:78
uint64_t & get_right_span() noexcept
Returns a reference to the right span of this flux.
Definition: dependency_flux.hpp:76
Linear arrangement of vertices.
Definition: linear_arrangement.hpp:103
Exact rational number.
Definition: rational.hpp:63
double to_double() const noexcept
Converts this rational to a double-precision floating-point value.
Definition: rational.hpp:850
std::vector< dependency_flux > compute_flux(const graphs::free_tree &t, const linear_arrangement &pi={}) noexcept
Computes the flux of a dependency tree.
Main namespace of the library.
Definition: basic_types.hpp:50