|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Classes | |
| struct | Filtered_Show_Arc |
| class | Painting_Within_Max |
| A painting of Dijkstra that leaves out the nodes whose distances do not fit, as nodes that the start does not reach, instead of throwing. More... | |
| struct | Path_Snapshot |
| struct | Path_State |
| struct | Reverse_Arc_Distance |
| struct | Suffix_Index |
Functions | |
| template<template< typename, class > class Itor, AlephGraph GT, ArcFilter< GT > SA, class Op > | |
| void | for_each_left_out (typename GT::Node *start, SA sa, Op op) |
| Calls op on each node that start reaches through the arcs that sa shows, but that a painting from start did not reach: those whose distances from it do not fit. | |
| template<AlephGraph GT, ArcDistance< GT > Distance, ArcFilter< GT > SA> requires std::is_arithmetic_v<typename Distance::Distance_Type> | |
| void | validate_non_negative_weights (const GT &g, Distance distance, SA sa) |
| template<AlephGraph GT, typename Cost_Type > | |
| Path_Snapshot< GT, Cost_Type > | make_path_snapshot (const Path_State< GT, Cost_Type > &path) |
| template<AlephGraph GT, typename Cost_Type > | |
| Path_State< GT, Cost_Type > | path_to_state (const Path< GT > &path, const Cost_Type total_cost) |
| template<AlephGraph GT, typename Cost_Type > | |
| Path< GT > | state_to_path (const GT &g, const Path_State< GT, Cost_Type > &state) |
| template<AlephGraph GT, typename Cost_Type > | |
| bool | same_path_sequence (const Path_State< GT, Cost_Type > &a, const Path_State< GT, Cost_Type > &b) |
| template<AlephGraph GT, typename Cost_Type > | |
| bool | same_prefix_nodes (const Path_Snapshot< GT, Cost_Type > &a, const Path_Snapshot< GT, Cost_Type > &b, const size_t spur_index) |
| template<AlephGraph GT, typename Cost_Type > | |
| bool | contains_path (const Array< Path_State< GT, Cost_Type > > &container, const Path_State< GT, Cost_Type > &candidate) |
| template<AlephGraph GT, typename Cost_Type > | |
| GT::Node * | get_tree_next (const Suffix_Index< GT, Cost_Type > &index, typename GT::Node *node) |
| template<AlephGraph GT, typename Cost_Type > | |
| GT::Arc * | get_tree_arc (const Suffix_Index< GT, Cost_Type > &index, typename GT::Node *node) |
| template<template< class, class > class Itor, AlephGraph GT, ArcDistance< GT > Distance, ArcFilter< GT > SA> | |
| Suffix_Index< GT, typename Distance::Distance_Type > | build_suffix_index_with_itor (const GT &g, typename GT::Node *target, Distance distance, SA sa) |
| template<AlephGraph GT, ArcDistance< GT > Distance, ArcFilter< GT > SA> | |
| Suffix_Index< GT, typename Distance::Distance_Type > | build_suffix_index_digraph (const GT &g, typename GT::Node *target, Distance distance, SA sa) |
| template<AlephGraph GT, ArcDistance< GT > Distance, ArcFilter< GT > SA> | |
| Suffix_Index< GT, typename Distance::Distance_Type > | build_suffix_index (const GT &g, typename GT::Node *target, Distance distance, SA sa) |
| template<AlephGraph GT, typename Cost_Type > | |
| bool | build_suffix_state (const GT &g, const Suffix_Index< GT, Cost_Type > &index, typename GT::Node *start, typename GT::Node *target, Path_State< GT, Cost_Type > &out_suffix) |
| template<AlephGraph GT, ArcDistance< GT > Distance, ArcFilter< GT > SA> | |
| bool | shortest_path_filtered (const GT &g, typename GT::Node *source, typename GT::Node *target, Distance distance, SA sa, const DynSetTree< typename GT::Node * > *forbidden_nodes, const DynSetTree< typename GT::Arc * > *forbidden_arcs, Path_State< GT, typename Distance::Distance_Type > &out, bool &beyond) |
| template<AlephGraph GT, ArcDistance< GT > Distance> | |
| bool | cost_of_arcs_if_fits (const DynList< typename GT::Arc * > &arcs, Distance distance, typename Distance::Distance_Type &total) |
| template<AlephGraph GT, typename Cost_Type > | |
| Path_State< GT, Cost_Type > | compose_candidate (const Path_Snapshot< GT, Cost_Type > &base_path, const size_t spur_index, const Path_State< GT, Cost_Type > &spur_state) |
| template<AlephGraph GT, typename Cost_Type > | |
| Path_State< GT, Cost_Type > | compose_general_candidate (const Path_Snapshot< GT, Cost_Type > &base_path, const size_t spur_index, typename GT::Arc *deviation_arc, typename GT::Node *deviation_next_node, const Path_State< GT, Cost_Type > &suffix_state) |
| template<AlephGraph GT, ArcDistance< GT > Distance, ArcFilter< GT > SA, typename Cost_Type > | |
| void | generate_general_deviation_candidates (const GT &g, const Path_State< GT, Cost_Type > &base_path, typename GT::Node *target, const Suffix_Index< GT, Cost_Type > &suffix_index, Distance distance, SA sa, const Array< Path_State< GT, Cost_Type > > &accepted, Array< Path_State< GT, Cost_Type > > &candidates, bool &beyond) |
| Suffix_Index< GT, typename Distance::Distance_Type > Aleph::k_shortest_paths_detail::build_suffix_index | ( | const GT & | g, |
| typename GT::Node * | target, | ||
| Distance | distance, | ||
| SA | sa | ||
| ) |
Definition at line 646 of file K_Shortest_Paths.H.
References GraphCommon< GT, Node, Arc >::is_digraph().
| Suffix_Index< GT, typename Distance::Distance_Type > Aleph::k_shortest_paths_detail::build_suffix_index_digraph | ( | const GT & | g, |
| typename GT::Node * | target, | ||
| Distance | distance, | ||
| SA | sa | ||
| ) |
Definition at line 515 of file K_Shortest_Paths.H.
References Aleph::shortest_path_detail::add_if_fits(), Aleph::k_shortest_paths_detail::Suffix_Index< GT, Cost_Type >::beyond_max, Aleph::diff(), Aleph::k_shortest_paths_detail::Suffix_Index< GT, Cost_Type >::dist_to_target, Aleph::DynMapTree< Key, Data, Tree, Compare >::find(), GraphCommon< GT, Node, Arc >::get_src_node(), GraphCommon< GT, Node, Arc >::get_tgt_node(), Aleph::DynSetTree< Key, Tree, Compare >::insert(), Aleph::DynMapTree< Key, Data, Tree, Compare >::insert(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), IS_NODE_VISITED, Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne(), NODE_COOKIE, GraphCommon< GT, Node, Arc >::reset_arcs(), GraphCommon< GT, Node, Arc >::reset_nodes(), Aleph::Spanning_Tree, Aleph::k_shortest_paths_detail::Suffix_Index< GT, Cost_Type >::tree_arc, and Aleph::k_shortest_paths_detail::Suffix_Index< GT, Cost_Type >::tree_next.
| Suffix_Index< GT, typename Distance::Distance_Type > Aleph::k_shortest_paths_detail::build_suffix_index_with_itor | ( | const GT & | g, |
| typename GT::Node * | target, | ||
| Distance | distance, | ||
| SA | sa | ||
| ) |
Definition at line 424 of file K_Shortest_Paths.H.
References Aleph::shortest_path_detail::add_if_fits(), Aleph::and, Aleph::k_shortest_paths_detail::Suffix_Index< GT, Cost_Type >::beyond_max, Aleph::diff(), Aleph::k_shortest_paths_detail::Suffix_Index< GT, Cost_Type >::dist_to_target, Aleph::DynMapTree< Key, Data, Tree, Compare >::find(), Aleph::Dijkstra_Min_Paths< GT, Distance, Itor, SA, HeapT >::get_distance(), Aleph::DynSetTree< Key, Tree, Compare >::insert(), Aleph::DynMapTree< Key, Data, Tree, Compare >::insert(), IS_ARC_VISITED, IS_NODE_VISITED, Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne(), NODE_COOKIE, Aleph::Dijkstra_Min_Paths< GT, Distance, Itor, SA, HeapT >::paint_min_paths_tree(), Aleph::Spanning_Tree, Aleph::k_shortest_paths_detail::Suffix_Index< GT, Cost_Type >::tree_arc, Aleph::k_shortest_paths_detail::Suffix_Index< GT, Cost_Type >::tree_next, and Aleph::k_shortest_paths_detail::Painting_Within_Max< GT, Distance, Itor, SA >::went_beyond_max().
| bool Aleph::k_shortest_paths_detail::build_suffix_state | ( | const GT & | g, |
| const Suffix_Index< GT, Cost_Type > & | index, | ||
| typename GT::Node * | start, | ||
| typename GT::Node * | target, | ||
| Path_State< GT, Cost_Type > & | out_suffix | ||
| ) |
Definition at line 661 of file K_Shortest_Paths.H.
References Aleph::DynList< T >::append(), Aleph::k_shortest_paths_detail::Path_State< GT, Cost_Type >::arcs, Aleph::k_shortest_paths_detail::Suffix_Index< GT, Cost_Type >::dist_to_target, GraphCommon< GT, Node, Arc >::get_num_nodes(), get_tree_arc(), get_tree_next(), Aleph::next(), Aleph::k_shortest_paths_detail::Path_State< GT, Cost_Type >::nodes, Aleph::DynMapTree< Key, Data, Tree, Compare >::search(), and Aleph::k_shortest_paths_detail::Path_State< GT, Cost_Type >::total_cost.
Referenced by generate_general_deviation_candidates().
| Path_State< GT, Cost_Type > Aleph::k_shortest_paths_detail::compose_candidate | ( | const Path_Snapshot< GT, Cost_Type > & | base_path, |
| const size_t | spur_index, | ||
| const Path_State< GT, Cost_Type > & | spur_state | ||
| ) |
Definition at line 770 of file K_Shortest_Paths.H.
References Aleph::DynList< T >::append(), Aleph::k_shortest_paths_detail::Path_State< GT, Cost_Type >::arcs, Aleph::k_shortest_paths_detail::Path_Snapshot< GT, Cost_Type >::arcs, LocateFunctions< Container, Type >::get_it(), Aleph::k_shortest_paths_detail::Path_State< GT, Cost_Type >::nodes, and Aleph::k_shortest_paths_detail::Path_Snapshot< GT, Cost_Type >::nodes.
Referenced by Aleph::yen_k_shortest_paths().
| Path_State< GT, Cost_Type > Aleph::k_shortest_paths_detail::compose_general_candidate | ( | const Path_Snapshot< GT, Cost_Type > & | base_path, |
| const size_t | spur_index, | ||
| typename GT::Arc * | deviation_arc, | ||
| typename GT::Node * | deviation_next_node, | ||
| const Path_State< GT, Cost_Type > & | suffix_state | ||
| ) |
Definition at line 803 of file K_Shortest_Paths.H.
References Aleph::DynList< T >::append(), Aleph::k_shortest_paths_detail::Path_State< GT, Cost_Type >::arcs, Aleph::k_shortest_paths_detail::Path_Snapshot< GT, Cost_Type >::arcs, LocateFunctions< Container, Type >::get_it(), Aleph::k_shortest_paths_detail::Path_State< GT, Cost_Type >::nodes, and Aleph::k_shortest_paths_detail::Path_Snapshot< GT, Cost_Type >::nodes.
| bool Aleph::k_shortest_paths_detail::contains_path | ( | const Array< Path_State< GT, Cost_Type > > & | container, |
| const Path_State< GT, Cost_Type > & | candidate | ||
| ) |
Definition at line 391 of file K_Shortest_Paths.H.
References same_path_sequence().
Referenced by Aleph::eppstein_k_shortest_paths(), generate_general_deviation_candidates(), and Aleph::yen_k_shortest_paths().
| bool Aleph::k_shortest_paths_detail::cost_of_arcs_if_fits | ( | const DynList< typename GT::Arc * > & | arcs, |
| Distance | distance, | ||
| typename Distance::Distance_Type & | total | ||
| ) |
Definition at line 756 of file K_Shortest_Paths.H.
References Aleph::shortest_path_detail::add_if_fits(), and arcs.
| void Aleph::k_shortest_paths_detail::for_each_left_out | ( | typename GT::Node * | start, |
| SA | sa, | ||
| Op | op | ||
| ) |
Calls op on each node that start reaches through the arcs that sa shows, but that a painting from start did not reach: those whose distances from it do not fit.
Definition at line 151 of file K_Shortest_Paths.H.
References Aleph::DynListQueue< T >::get(), Aleph::DynSetTree< Key, Tree, Compare >::insert(), Aleph::DynListQueue< T >::is_empty(), IS_NODE_VISITED, Aleph::DynListQueue< T >::put(), and Aleph::Spanning_Tree.
| void Aleph::k_shortest_paths_detail::generate_general_deviation_candidates | ( | const GT & | g, |
| const Path_State< GT, Cost_Type > & | base_path, | ||
| typename GT::Node * | target, | ||
| const Suffix_Index< GT, Cost_Type > & | suffix_index, | ||
| Distance | distance, | ||
| SA | sa, | ||
| const Array< Path_State< GT, Cost_Type > > & | accepted, | ||
| Array< Path_State< GT, Cost_Type > > & | candidates, | ||
| bool & | beyond | ||
| ) |
Definition at line 843 of file K_Shortest_Paths.H.
References Aleph::shortest_path_detail::add_if_fits(), Aleph::and, Aleph::k_shortest_paths_detail::Path_State< GT, Cost_Type >::arcs, Aleph::k_shortest_paths_detail::Path_Snapshot< GT, Cost_Type >::arcs, Aleph::k_shortest_paths_detail::Suffix_Index< GT, Cost_Type >::beyond_max, build_suffix_state(), Aleph::shortest_path_detail::checked_add(), Aleph::DynSetTree< Key, Tree, Compare >::contains(), contains_path(), Aleph::k_shortest_paths_detail::Suffix_Index< GT, Cost_Type >::dist_to_target, Aleph::DynSetTree< Key, Tree, Compare >::is_empty(), Aleph::HTList::is_empty(), Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne(), Aleph::k_shortest_paths_detail::Path_Snapshot< GT, Cost_Type >::nodes, Aleph::DynMapTree< Key, Data, Tree, Compare >::search(), Aleph::Array< T >::size(), and Aleph::k_shortest_paths_detail::Path_State< GT, Cost_Type >::total_cost.
| GT::Arc * Aleph::k_shortest_paths_detail::get_tree_arc | ( | const Suffix_Index< GT, Cost_Type > & | index, |
| typename GT::Node * | node | ||
| ) |
Definition at line 413 of file K_Shortest_Paths.H.
References Aleph::DynMapTree< Key, Data, Tree, Compare >::search(), and Aleph::k_shortest_paths_detail::Suffix_Index< GT, Cost_Type >::tree_arc.
Referenced by build_suffix_state().
| GT::Node * Aleph::k_shortest_paths_detail::get_tree_next | ( | const Suffix_Index< GT, Cost_Type > & | index, |
| typename GT::Node * | node | ||
| ) |
Definition at line 403 of file K_Shortest_Paths.H.
References Aleph::DynMapTree< Key, Data, Tree, Compare >::search(), and Aleph::k_shortest_paths_detail::Suffix_Index< GT, Cost_Type >::tree_next.
Referenced by build_suffix_state().
| Path_Snapshot< GT, Cost_Type > Aleph::k_shortest_paths_detail::make_path_snapshot | ( | const Path_State< GT, Cost_Type > & | path | ) |
Definition at line 277 of file K_Shortest_Paths.H.
References Aleph::k_shortest_paths_detail::Path_State< GT, Cost_Type >::arcs, LocateFunctions< Container, Type >::get_it(), adaptive_huffman_demo::Snapshot::nodes, Aleph::k_shortest_paths_detail::Path_State< GT, Cost_Type >::nodes, and Aleph::DynList< T >::size().
| Path_State< GT, Cost_Type > Aleph::k_shortest_paths_detail::path_to_state | ( | const Path< GT > & | path, |
| const Cost_Type | total_cost | ||
| ) |
Definition at line 295 of file K_Shortest_Paths.H.
References Aleph::DynList< T >::append(), Aleph::k_shortest_paths_detail::Path_State< GT, Cost_Type >::arcs, Aleph::Path< GT >::Iterator::has_current_node(), Aleph::k_shortest_paths_detail::Path_State< GT, Cost_Type >::nodes, and Aleph::k_shortest_paths_detail::Path_State< GT, Cost_Type >::total_cost.
| bool Aleph::k_shortest_paths_detail::same_path_sequence | ( | const Path_State< GT, Cost_Type > & | a, |
| const Path_State< GT, Cost_Type > & | b | ||
| ) |
Definition at line 336 of file K_Shortest_Paths.H.
References Aleph::k_shortest_paths_detail::Path_State< GT, Cost_Type >::arcs, LocateFunctions< Container, Type >::get_it(), Aleph::k_shortest_paths_detail::Path_State< GT, Cost_Type >::nodes, and Aleph::DynList< T >::size().
Referenced by contains_path().
| bool Aleph::k_shortest_paths_detail::same_prefix_nodes | ( | const Path_Snapshot< GT, Cost_Type > & | a, |
| const Path_Snapshot< GT, Cost_Type > & | b, | ||
| const size_t | spur_index | ||
| ) |
Definition at line 369 of file K_Shortest_Paths.H.
References Aleph::k_shortest_paths_detail::Path_Snapshot< GT, Cost_Type >::arcs, Aleph::k_shortest_paths_detail::Path_Snapshot< GT, Cost_Type >::nodes, and Aleph::Array< T >::size().
Referenced by Aleph::yen_k_shortest_paths().
| bool Aleph::k_shortest_paths_detail::shortest_path_filtered | ( | const GT & | g, |
| typename GT::Node * | source, | ||
| typename GT::Node * | target, | ||
| Distance | distance, | ||
| SA | sa, | ||
| const DynSetTree< typename GT::Node * > * | forbidden_nodes, | ||
| const DynSetTree< typename GT::Arc * > * | forbidden_arcs, | ||
| Path_State< GT, typename Distance::Distance_Type > & | out, | ||
| bool & | beyond | ||
| ) |
Definition at line 701 of file K_Shortest_Paths.H.
References Aleph::and, Aleph::DynSetTree< Key, Tree, Compare >::contains(), Aleph::filter(), Aleph::Path< GT >::is_empty(), and out.
| Path< GT > Aleph::k_shortest_paths_detail::state_to_path | ( | const GT & | g, |
| const Path_State< GT, Cost_Type > & | state | ||
| ) |
Definition at line 312 of file K_Shortest_Paths.H.
References Aleph::Path< GT >::append(), Aleph::Path< GT >::append_directed(), Aleph::k_shortest_paths_detail::Path_State< GT, Cost_Type >::arcs, Aleph::DynList< T >::get_first(), LocateFunctions< Container, Type >::get_it(), GraphCommon< GT, Node, Arc >::is_digraph(), Aleph::HTList::is_empty(), Aleph::k_shortest_paths_detail::Path_State< GT, Cost_Type >::nodes, and Aleph::Path< GT >::set_graph().
Referenced by Aleph::eppstein_k_shortest_paths(), and Aleph::yen_k_shortest_paths().
| void Aleph::k_shortest_paths_detail::validate_non_negative_weights | ( | const GT & | g, |
| Distance | distance, | ||
| SA | sa | ||
| ) |
Definition at line 245 of file K_Shortest_Paths.H.
References ah_domain_error_if, Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne(), and w.
Referenced by Aleph::eppstein_k_shortest_paths(), and Aleph::yen_k_shortest_paths().