In planar arrangements.
More...
|
typedef std::vector< std::vector< sorted_adjacency_list_info > > | sorted_adjacency_list |
| Useful shorthand for a sorted adjacency list.
|
|
◆ return_type_all_maxs
All return types as enumeration values.
For function all_max_sum_lengths_values.
Enumerator |
---|
DMax_value_vertex_and_max_root | Return both the set of max projective values at every vertex and the vertex that maximizes the maximum projective.
|
DMax_value_vertex | Return only the max projective values for every vertex of the tree.
|
max_root | Return only a vertex that maximizes the maximum projective.
|
◆ AEF()
template<bool make_arrangement>
Maximum planar arrangement of a free tree.
This algorithm calculates the maximum sum of edge lengths on every vertex and keeps track of the maximum. The calculation of DMax on every vertex is done in \(O(n)\) thanks to the adjacency list calculated by function make_sorted_adjacency_list.
This function calls all_max_sum_lengths_values, which implements the algorithm described in [8].
- Template Parameters
-
make_arrangement | Construct a maximum arrangement. |
- Parameters
-
- Returns
- A pair of cost and maximum linear arrangement.
◆ all_max_sum_lengths_values()
Maximum planar arrangement of a free tree.
This algorithm calculates the maximum sum of edge lengths on every vertex and keeps track of the maximum. The calculation of the maximum sum of edge lengths on every vertex is done in \(O(n)\) thanks to the adjacency list calculated by function make_sorted_adjacency_list.
This function implements the algorithm in [8].
- Template Parameters
-
- Parameters
-
- Returns
- Depending of the value of res_type, a list of values, a p
◆ make_sorted_adjacency_list()
Construct the for every vertex in the tree. .
Sorted adjacency list needed to calculate the maximum sum of edge legnths.
This adjacency list is needed in function all_max_sum_lengths_values.
- Parameters
-
- Returns
- The appropriate sorted adjacency list.