Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT > Class Template Reference

Base class providing common infrastructure for shortest path algorithms. More...

#include <shortest_path_common.H>

Inheritance diagram for Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >:
[legend]
Collaboration diagram for Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >:
[legend]

Classes

struct  Arc_Info
 Information stored in arc cookies for painting version. More...
 
struct  Destroy_Arc
 Arc cleanup for painting version. More...
 
struct  Destroy_Node
 Node cleanup for painting version. More...
 
struct  Destroy_Tree_Arc
 Arc cleanup and mapping for tree-building version. More...
 
struct  Destroy_Tree_Node
 Node cleanup and mapping for tree-building version. More...
 
struct  Get_Potential_Arc
 Functor to get arc potential for heap ordering. More...
 
struct  Heap_Info
 Functor to access heap node handle from node cookie. More...
 
struct  Initialize_Arc
 Arc initialization for painting version. More...
 
struct  Initialize_Node
 Node initialization for painting version. More...
 
struct  Initialize_Tree_Arc
 Arc initialization for tree-building version. More...
 
struct  Initialize_Tree_Node
 Node initialization for tree-building version. More...
 
struct  Node_Info
 Information stored in node cookies for painting version. More...
 
struct  Painted_Arc
 Arc filter that shows the arcs of the painted tree. More...
 
struct  Painted_Node
 Node filter that shows the nodes of the painted tree. More...
 
struct  Total
 Distance totalizer class for path copying. More...
 
struct  Tree_Arc_Info
 Extended arc info with tree arc mapping. More...
 
struct  Tree_Node_Info
 Extended node info with tree node mapping. More...
 

Public Types

using Heap = HeapT< GT, Get_Potential_Arc, Heap_Info >
 

Public Member Functions

 Shortest_Path_Base (Distance dist=Distance(), SA __sa=SA())
 Default constructor.
 
bool has_computation () const noexcept
 Check if a computation has been performed.
 
bool is_painted () const noexcept
 Check if the graph has been painted.
 
GT::Node * get_start_node () const noexcept
 Get the start node of the last computation.
 
GT * get_graph () const noexcept
 Get the graph of the last computation.
 
Distance::Distance_Type get_distance (typename GT::Node *node)
 Gets the accumulated distance to a node after painting.
 
Distance::Distance_Type get_min_path (typename GT::Node *end, Path< GT > &path)
 Extracts a shortest path to end from a previously painted graph.
 
Distance::Distance_Type copy_painted_min_paths_tree (GT &g, GT &tree)
 Extracts the painted shortest paths tree and puts it in tree.
 
Distance::Distance_Type get_min_path (const GT &tree, typename GT::Node *end, Path< GT > &path)
 Extracts path from tree to end node.
 

Protected Member Functions

template<class IN , class IA >
void init (const GT &g, typename GT::Node *start)
 Initialize algorithm state.
 
template<class DN , class DA >
auto uninit_on_exit ()
 Returns a guard that calls uninit() when it goes out of scope.
 
template<class DN , class DA >
void uninit ()
 Cleanup algorithm state.
 
bool add_if_fits (const typename Distance::Distance_Type &a, const typename Distance::Distance_Type &b, typename Distance::Distance_Type &out)
 Adds a tentative distance that may go beyond max().
 
void check_beyond_max (const GT &g, typename GT::Node *start, typename GT::Node *end=nullptr) const
 After a painting in which a sum went beyond max(), throws if a node that start reaches was left out, or end if it is given.
 
Distance::Distance_Type checked_add (const typename Distance::Distance_Type &a, const typename Distance::Distance_Type &b) const
 Checked addition to prevent integer overflow.
 

Protected Attributes

SA sa
 Arc filter.
 
Distance distance
 Arc weights.
 
Get_Potential_Arc get_pot
 Potential accessor.
 
Heap heap
 Priority queue.
 
bool painted = false
 Whether graph has been painted.
 
GT * ptr_g = nullptr
 Pointer to the graph.
 
GT::Node * s = nullptr
 Start node.
 
bool beyond_max = false
 A sum of the painting went beyond max()
 
bool leave_out_beyond_max = false
 Whether a painting leaves out without throwing the nodes whose distance does not fit.
 

Detailed Description

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
class Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >

Base class providing common infrastructure for shortest path algorithms.

This template class encapsulates shared functionality between Dijkstra's algorithm, A*, and similar shortest path algorithms. It provides:

  • Cookie structures for storing algorithm state in nodes/arcs
  • Initialize/Destroy functors for memory management
  • Common state management (init/uninit, painted flag, etc.)
  • Distance calculation from painted paths
Template Parameters
GTGraph type.
DistanceDistance accessor functor.
ItorArc iterator template.
SAArc filter for iterators.
HeapTPriority queue template.

Definition at line 203 of file shortest_path_common.H.

Member Typedef Documentation

◆ Heap

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
using Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::Heap = HeapT<GT, Get_Potential_Arc, Heap_Info>

Definition at line 423 of file shortest_path_common.H.

Constructor & Destructor Documentation

◆ Shortest_Path_Base()

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::Shortest_Path_Base ( Distance  dist = Distance(),
SA  __sa = SA() 
)
inline

Default constructor.

Parameters
distDistance functor for arc weights.
__saArc filter for iterators.

Definition at line 676 of file shortest_path_common.H.

Member Function Documentation

◆ add_if_fits()

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
bool Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::add_if_fits ( const typename Distance::Distance_Type &  a,
const typename Distance::Distance_Type &  b,
typename Distance::Distance_Type &  out 
)
inlineprotected

Adds a tentative distance that may go beyond max().

Sets out to a + b and returns true, but for an integral type whose sum goes beyond max(): then no distance that fits goes through it, and it returns false and remembers it in beyond_max, which check_beyond_max() looks at when the painting ends.

Parameters
aFirst operand.
bSecond operand.
[out]outThe sum, if it fits.
Returns
true if the sum fits; false if it goes beyond max().
Exceptions
std::overflow_errorIf the sum goes below lowest().

Definition at line 591 of file shortest_path_common.H.

References ah_overflow_error_if, Aleph::and, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::beyond_max, and out.

Referenced by Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::compute_min_paths_tree(), Aleph::Dijkstra_Min_Paths< GT, Distance, Itor, SA, HeapT >::compute_min_paths_tree(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::compute_partial_min_paths_tree(), Aleph::Dijkstra_Min_Paths< GT, Distance, Itor, SA, HeapT >::compute_partial_min_paths_tree(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::compute_partial_path(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::paint_min_paths_tree(), Aleph::Dijkstra_Min_Paths< GT, Distance, Itor, SA, HeapT >::paint_min_paths_tree(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::paint_partial_min_paths_tree(), Aleph::Dijkstra_Min_Paths< GT, Distance, Itor, SA, HeapT >::paint_partial_min_paths_tree(), and Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::paint_partial_path().

◆ check_beyond_max()

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
void Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::check_beyond_max ( const GT &  g,
typename GT::Node *  start,
typename GT::Node *  end = nullptr 
) const
inlineprotected

After a painting in which a sum went beyond max(), throws if a node that start reaches was left out, or end if it is given.

Every path to such a node has a sum beyond max(), so that its distance does not fit. The walk goes through the arcs that the filter shows, without touching the painting. With leave_out_beyond_max, it throws nothing.

Exceptions
shortest_path_detail::Beyond_Max_ErrorIf such a node exists; it is a std::overflow_error.
std::bad_allocIf there is not enough memory.

It is rare, and out of line: copied into a painting, its check of leave_out_beyond_max changed the code of the loop of the painting.

Definition at line 626 of file shortest_path_common.H.

References Aleph::DynListQueue< T >::get(), Aleph::DynSetTree< Key, Tree, Compare >::insert(), Aleph::DynListQueue< T >::is_empty(), IS_NODE_VISITED, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::leave_out_beyond_max, Aleph::DynListQueue< T >::put(), Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::sa, and Aleph::Spanning_Tree.

Referenced by Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::compute_min_paths_tree(), Aleph::Dijkstra_Min_Paths< GT, Distance, Itor, SA, HeapT >::compute_min_paths_tree(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::compute_partial_min_paths_tree(), Aleph::Dijkstra_Min_Paths< GT, Distance, Itor, SA, HeapT >::compute_partial_min_paths_tree(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::compute_partial_path(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::paint_min_paths_tree(), Aleph::Dijkstra_Min_Paths< GT, Distance, Itor, SA, HeapT >::paint_min_paths_tree(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::paint_partial_min_paths_tree(), Aleph::Dijkstra_Min_Paths< GT, Distance, Itor, SA, HeapT >::paint_partial_min_paths_tree(), and Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::paint_partial_path().

◆ checked_add()

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
Distance::Distance_Type Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::checked_add ( const typename Distance::Distance_Type &  a,
const typename Distance::Distance_Type &  b 
) const
inlineprotected

◆ copy_painted_min_paths_tree()

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
Distance::Distance_Type Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::copy_painted_min_paths_tree ( GT &  g,
GT &  tree 
)
inline

Extracts the painted shortest paths tree and puts it in tree.

Only the nodes that the painting reaches are copied, as compute_min_paths_tree() does. The nodes and arcs of g and of tree are mapped through their cookies; the cookies of the nodes that are not reached are null. Since the cookies held the painting, the painting cannot be used afterwards and is_painted() becomes false.

Parameters
[in]gThe previously painted graph.
[out]treeThe graph where the spanning tree will be copied.
Returns
The total distance of the spanning tree.
Exceptions
bad_allocIf there is not enough memory.
domain_errorIf the graph has not been previously painted.

Definition at line 863 of file shortest_path_common.H.

References ah_domain_error_if, ARC_COOKIE, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::distance, Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne(), NODE_COOKIE, and Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::painted.

◆ get_distance()

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
Distance::Distance_Type Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::get_distance ( typename GT::Node *  node)
inline

Gets the accumulated distance to a node after painting.

After painting the graph with a shortest path tree, this method traverses the path from the start node to the given node and computes the total distance.

Parameters
[in]nodeThe destination node.
Returns
The accumulated distance from start to node.
Exceptions
domain_errorIf the graph has not been painted or if node is not reachable from the start node.
Note
Time complexity: O(path_length)

Definition at line 730 of file shortest_path_common.H.

References ah_domain_error_if, Aleph::and, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::distance, IS_ARC_VISITED, IS_NODE_VISITED, NODE_COOKIE, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::painted, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::s, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::sa, and Aleph::Spanning_Tree.

Referenced by TYPED_TEST().

◆ get_graph()

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
GT * Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::get_graph ( ) const
inlinenoexcept

Get the graph of the last computation.

Returns
Pointer to the graph, or nullptr if no computation done.

Definition at line 710 of file shortest_path_common.H.

References Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::ptr_g.

Referenced by TYPED_TEST().

◆ get_min_path() [1/2]

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
Distance::Distance_Type Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::get_min_path ( const GT &  tree,
typename GT::Node *  end,
Path< GT > &  path 
)
inline

Extracts path from tree to end node.

Parameters
[in]treeThe spanning tree built by compute_min_paths_tree.
[in]endDestination node (in original graph).
[out]pathPath where result will be stored (in original graph), made of the arcs of g that those of the tree map to.
Returns
The total cost of the path, by the distance of the arcs of g.
Exceptions
domain_errorIf the minimum paths tree has not been computed, or end is not in the tree, nor reached in it from the start.
bad_allocIf there is not enough memory.

Definition at line 901 of file shortest_path_common.H.

References ah_domain_error_if, Aleph::Path< GT >::append(), Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::distance, Aleph::Path< GT >::empty(), Aleph::Path< GT >::Iterator::has_current_arc(), Aleph::Path< GT >::init(), Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::ptr_g, and Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::s.

◆ get_min_path() [2/2]

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
Distance::Distance_Type Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::get_min_path ( typename GT::Node *  end,
Path< GT > &  path 
)
inline

Extracts a shortest path to end from a previously painted graph.

Takes a graph on which shortest paths have been painted and extracts the shortest path to end, storing it in path.

Parameters
[in]endDestination node of the path.
[out]pathPath where the shortest path will be stored.
Returns
The total cost of the path.
Exceptions
bad_allocIf there is not enough memory.
domain_errorIf the graph has not been previously painted.

Definition at line 781 of file shortest_path_common.H.

References ah_domain_error_if, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::distance, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::painted, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::ptr_g, and Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::s.

Referenced by TYPED_TEST().

◆ get_start_node()

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
GT::Node * Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::get_start_node ( ) const
inlinenoexcept

Get the start node of the last computation.

Returns
Pointer to the start node, or nullptr if no computation done.

Definition at line 705 of file shortest_path_common.H.

References Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::s.

Referenced by TYPED_TEST().

◆ has_computation()

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
bool Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::has_computation ( ) const
inlinenoexcept

Check if a computation has been performed.

Returns
true if a graph has been processed, false otherwise.

Definition at line 690 of file shortest_path_common.H.

References Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::ptr_g.

Referenced by TYPED_TEST().

◆ init()

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
template<class IN , class IA >
void Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::init ( const GT &  g,
typename GT::Node *  start 
)
inlineprotected

Initialize algorithm state.

Gives every node and every arc shown by the filter a new cookie. With a filter that can throw (see nothrow_arc_filter_v), the bit Min of each arc says whether it has one, so that uninit() frees them without calling the filter again. A previous painting is lost, since its bits and cookies are reset.

Template Parameters
INNode initializer functor type.
IAArc initializer functor type.
Parameters
gThe graph.
startThe starting node.
Exceptions
std::bad_allocIf there is not enough memory.
anythingthat the filter throws.

If it throws, the cookies already allocated are freed and left null.

Definition at line 473 of file shortest_path_common.H.

References Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::beyond_max, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::heap, IS_ARC_VISITED, Aleph::Min, Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne(), num_nodes, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::painted, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::ptr_g, GraphCommon< GT, Node, Arc >::reset_bit(), Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::s, Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::sa, GraphCommon< GT, Node, Arc >::set_bit(), and Aleph::Spanning_Tree.

◆ is_painted()

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
bool Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::is_painted ( ) const
inlinenoexcept

Check if the graph has been painted.

Every computation resets the bits and cookies of the previous one, so only a painting that ended normally can be used.

Returns
true if the last computation was a painting and ended normally, false otherwise.

Definition at line 700 of file shortest_path_common.H.

References Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::painted.

Referenced by TYPED_TEST().

◆ uninit()

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
template<class DN , class DA >
void Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::uninit ( )
inlineprotected

Cleanup algorithm state.

Frees the cookies that init() gave. With a filter that can throw, it finds those of the arcs by their bit Min, without calling the filter: it runs in the destructor of the guard of uninit_on_exit().

Template Parameters
DNNode destroyer functor type.
DAArc destroyer functor type.

Definition at line 562 of file shortest_path_common.H.

References Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::heap, IS_ARC_VISITED, Aleph::Min, Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne(), Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::ptr_g, and Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::sa.

◆ uninit_on_exit()

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
template<class DN , class DA >
auto Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::uninit_on_exit ( )
inlineprotected

Returns a guard that calls uninit() when it goes out of scope.

The algorithms take one right after init(), so that the cookies are freed however they end: by returning or by an exception.

Template Parameters
DNNode destroyer functor type.
DAArc destroyer functor type.
Returns
The guard, which must live until the algorithm ends.

Definition at line 547 of file shortest_path_common.H.

References Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::ptr_g.

Member Data Documentation

◆ beyond_max

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
bool Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::beyond_max = false
protected

◆ distance

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
Distance Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::distance
protected

◆ get_pot

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
Get_Potential_Arc Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::get_pot
protected

Potential accessor.

Definition at line 432 of file shortest_path_common.H.

◆ heap

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
Heap Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::heap
protected

◆ leave_out_beyond_max

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
bool Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::leave_out_beyond_max = false
protected

Whether a painting leaves out without throwing the nodes whose distance does not fit.

With it, check_beyond_max() throws nothing, so that a painting gives the nodes whose distances fit, and takes the others as nodes that the start does not reach; beyond_max says whether it may have left out some. It is false, and only a class derived from a painting sets it, for an algorithm that needs the nodes whose distances fit, as the index of Eppstein.

Definition at line 449 of file shortest_path_common.H.

Referenced by Aleph::k_shortest_paths_detail::Painting_Within_Max< GT, Distance, Itor, SA >::Painting_Within_Max(), and Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::check_beyond_max().

◆ painted

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
bool Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::painted = false
protected

◆ ptr_g

◆ s

◆ sa

template<AlephGraph GT, ArcDistance< GT > Distance, template< typename, class > class Itor, ArcFilter< GT > SA, template< class, class, class > class HeapT>
SA Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::sa
protected

The documentation for this class was generated from the following file: