|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
#include <Tree_Decomposition.H>
Public Types | |
| using | Node = typename GT::Node |
| using | Arc = typename GT::Arc |
Public Member Functions | |
| Rooted_Tree_Topology (const GT &g, Node *root, SA sa=SA()) | |
| size_t | size () const noexcept |
| bool | is_empty () const noexcept |
| Node * | root () const noexcept |
| size_t | root_id () const noexcept |
| const Array< Node * > & | id_to_node () const noexcept |
| const Array< Array< size_t > > & | adjacency () const noexcept |
| size_t | id_of (const Node *node) const |
| Node * | node_of (const size_t id) const |
| void | validate_id (const size_t id, const char *where) const |
Static Public Attributes | |
| static constexpr size_t | NONE = std::numeric_limits<size_t>::max() |
Private Types | |
| using | Pair_Key = std::pair< size_t, size_t > |
Private Member Functions | |
| void | check_id (const size_t id, const char *where) const |
| void | index_nodes () |
| void | build_simple_adjacency () |
| void | validate_connected_acyclic () const |
Static Private Member Functions | |
| static Pair_Key | normalize_pair (size_t u, size_t v) noexcept |
Private Attributes | |
| const GT * | graph_ = nullptr |
| SA | sa_ |
| Node * | root_ = nullptr |
| size_t | root_id_ = NONE |
| size_t | n_ = 0 |
| Array< Node * > | id_to_node_ |
| MapOLhash< Node *, size_t > | node_to_id_ |
| Array< Array< size_t > > | adjacency_ |
Definition at line 152 of file Tree_Decomposition.H.
Definition at line 156 of file Tree_Decomposition.H.
Definition at line 155 of file Tree_Decomposition.H.
|
private |
Definition at line 161 of file Tree_Decomposition.H.
|
inline |
Definition at line 328 of file Tree_Decomposition.H.
References Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::build_simple_adjacency(), Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::index_nodes(), and Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::validate_connected_acyclic().
|
inlinenoexcept |
Definition at line 346 of file Tree_Decomposition.H.
References Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::adjacency_.
Referenced by Aleph::Gen_Centroid_Decomposition< GT, SA >::append_centroid_annotations(), Aleph::Gen_Centroid_Decomposition< GT, SA >::build_centroid_tree(), Aleph::Gen_Heavy_Light_Decomposition< GT, SA >::build_decomposition(), Aleph::Gen_Centroid_Decomposition< GT, SA >::choose_centroid(), and Aleph::Gen_Centroid_Decomposition< GT, SA >::collect_component_nodes().
|
inlineprivate |
Definition at line 224 of file Tree_Decomposition.H.
References Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::adjacency_, ah_domain_error_if, ah_runtime_error_unless, Aleph::and, Aleph::divide_and_conquer_partition_dp(), GraphCommon< GT, Node, Arc >::get_src_node(), GraphCommon< GT, Node, Arc >::get_tgt_node(), Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::graph_, Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::n_, Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne(), Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::node_to_id_, Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::normalize_pair(), Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::sa_, and Aleph::MapOpenHash< Key, Data, Cmp, HashTable >::search().
Referenced by Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::Rooted_Tree_Topology().
|
inlineprivate |
Definition at line 181 of file Tree_Decomposition.H.
References ah_out_of_range_error_if, Aleph::divide_and_conquer_partition_dp(), and Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::n_.
Referenced by Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::node_of(), and Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::validate_id().
|
inline |
Definition at line 351 of file Tree_Decomposition.H.
References ah_domain_error_if, ah_invalid_argument_if, Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::node_to_id_, and Aleph::MapOpenHash< Key, Data, Cmp, HashTable >::search().
|
inlinenoexcept |
Definition at line 341 of file Tree_Decomposition.H.
References Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::id_to_node_.
|
inlineprivate |
Definition at line 187 of file Tree_Decomposition.H.
References ah_domain_error_if, ah_runtime_error_unless, Aleph::Array< T >::create(), Aleph::divide_and_conquer_partition_dp(), Aleph::MapOpenHash< Key, Data, Cmp, HashTable >::find(), GraphCommon< GT, Node, Arc >::get_num_nodes(), Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::graph_, Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::id_to_node_, Aleph::MapOpenHash< Key, Data, Cmp, HashTable >::insert(), Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::n_, Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne(), Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::node_to_id_, Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::root_, Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::root_id_, and Aleph::MapOpenHash< Key, Data, Cmp, HashTable >::search().
Referenced by Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::Rooted_Tree_Topology().
|
inlinenoexcept |
Definition at line 337 of file Tree_Decomposition.H.
References Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::n_.
|
inline |
Definition at line 363 of file Tree_Decomposition.H.
References Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::check_id(), and Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::id_to_node_.
|
inlinestaticprivatenoexcept |
Definition at line 174 of file Tree_Decomposition.H.
Referenced by Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::build_simple_adjacency().
|
inlinenoexcept |
Definition at line 338 of file Tree_Decomposition.H.
References Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::root_.
|
inlinenoexcept |
Definition at line 339 of file Tree_Decomposition.H.
References Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::root_id_.
Referenced by Aleph::Gen_Centroid_Decomposition< GT, SA >::build_centroid_tree(), and Aleph::Gen_Heavy_Light_Decomposition< GT, SA >::build_decomposition().
|
inlinenoexcept |
Definition at line 336 of file Tree_Decomposition.H.
References Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::n_.
|
inlineprivate |
Definition at line 280 of file Tree_Decomposition.H.
References Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::adjacency_, ah_domain_error_if, Aleph::Array< T >::create(), Aleph::divide_and_conquer_partition_dp(), Aleph::DynListStack< T >::is_empty(), Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::n_, Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::NONE, Aleph::DynListStack< T >::pop(), Aleph::DynListStack< T >::push(), Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::root_id_, and Aleph::DynListStack< T >::top().
Referenced by Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::Rooted_Tree_Topology().
|
inline |
Definition at line 369 of file Tree_Decomposition.H.
References Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::check_id(), and Aleph::divide_and_conquer_partition_dp().
|
private |
Definition at line 172 of file Tree_Decomposition.H.
Referenced by Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::adjacency(), Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::build_simple_adjacency(), and Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::validate_connected_acyclic().
|
private |
Definition at line 163 of file Tree_Decomposition.H.
Referenced by Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::build_simple_adjacency(), and Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::index_nodes().
|
private |
Definition at line 170 of file Tree_Decomposition.H.
Referenced by Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::id_to_node(), Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::index_nodes(), and Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::node_of().
|
private |
Definition at line 168 of file Tree_Decomposition.H.
Referenced by Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::build_simple_adjacency(), Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::check_id(), Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::index_nodes(), Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::is_empty(), Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::size(), and Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::validate_connected_acyclic().
|
private |
Definition at line 171 of file Tree_Decomposition.H.
Referenced by Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::build_simple_adjacency(), Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::id_of(), and Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::index_nodes().
|
staticconstexpr |
Definition at line 158 of file Tree_Decomposition.H.
Referenced by Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::validate_connected_acyclic().
|
private |
Definition at line 165 of file Tree_Decomposition.H.
Referenced by Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::index_nodes(), and Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::root().
|
private |
Definition at line 166 of file Tree_Decomposition.H.
Referenced by Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::index_nodes(), Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::root_id(), and Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::validate_connected_acyclic().
|
private |
Definition at line 164 of file Tree_Decomposition.H.
Referenced by Aleph::tree_decomposition_detail::Rooted_Tree_Topology< GT, SA >::build_simple_adjacency().