Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::k_shortest_paths_detail Namespace Reference

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)
 

Function Documentation

◆ build_suffix_index()

template<AlephGraph GT, ArcDistance< GT > Distance, ArcFilter< GT > SA>
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().

◆ build_suffix_index_digraph()

◆ build_suffix_index_with_itor()

◆ build_suffix_state()

◆ compose_candidate()

template<AlephGraph GT, typename Cost_Type >
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 
)

◆ compose_general_candidate()

template<AlephGraph GT, typename Cost_Type >
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 
)

◆ contains_path()

template<AlephGraph GT, typename Cost_Type >
bool Aleph::k_shortest_paths_detail::contains_path ( const Array< Path_State< GT, Cost_Type > > &  container,
const Path_State< GT, Cost_Type > &  candidate 
)

◆ cost_of_arcs_if_fits()

template<AlephGraph GT, ArcDistance< GT > Distance>
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.

◆ for_each_left_out()

template<template< typename, class > class Itor, AlephGraph GT, ArcFilter< GT > SA, class Op >
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.

◆ generate_general_deviation_candidates()

◆ get_tree_arc()

template<AlephGraph GT, typename Cost_Type >
GT::Arc * Aleph::k_shortest_paths_detail::get_tree_arc ( const Suffix_Index< GT, Cost_Type > &  index,
typename GT::Node *  node 
)

◆ get_tree_next()

template<AlephGraph GT, typename Cost_Type >
GT::Node * Aleph::k_shortest_paths_detail::get_tree_next ( const Suffix_Index< GT, Cost_Type > &  index,
typename GT::Node *  node 
)

◆ make_path_snapshot()

template<AlephGraph GT, typename Cost_Type >
Path_Snapshot< GT, Cost_Type > Aleph::k_shortest_paths_detail::make_path_snapshot ( const Path_State< GT, Cost_Type > &  path)

◆ path_to_state()

template<AlephGraph GT, typename Cost_Type >
Path_State< GT, Cost_Type > Aleph::k_shortest_paths_detail::path_to_state ( const Path< GT > &  path,
const Cost_Type  total_cost 
)

◆ same_path_sequence()

template<AlephGraph GT, typename Cost_Type >
bool Aleph::k_shortest_paths_detail::same_path_sequence ( const Path_State< GT, Cost_Type > &  a,
const Path_State< GT, Cost_Type > &  b 
)

◆ same_prefix_nodes()

template<AlephGraph GT, typename Cost_Type >
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 
)

◆ shortest_path_filtered()

template<AlephGraph GT, ArcDistance< GT > Distance, ArcFilter< GT > SA>
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 
)

◆ state_to_path()

◆ validate_non_negative_weights()

template<AlephGraph GT, ArcDistance< GT > Distance, ArcFilter< GT > SA>
requires std::is_arithmetic_v<typename Distance::Distance_Type>
void Aleph::k_shortest_paths_detail::validate_non_negative_weights ( const GT &  g,
Distance  distance,
SA  sa 
)