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 >::Total Struct Reference

Distance totalizer class for path copying. More...

#include <shortest_path_common.H>

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

Public Member Functions

 Total ()=default
 Builds the totalizer with a distance accessor built by Distance().
 
 Total (Distance __distance)
 Builds the totalizer with a distance accessor.
 
bool operator() (typename GT::Arc *a)
 Adds the weight of an arc to dist.
 

Public Attributes

Distance::Distance_Type dist = 0
 
Distance distance {}
 Distance accessor for the arc weights.
 

Detailed Description

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

Distance totalizer class for path copying.

It keeps a copy of its distance accessor, which may have state, or no default constructor.

Definition at line 798 of file shortest_path_common.H.

Constructor & Destructor Documentation

◆ Total() [1/2]

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 >::Total::Total ( )
default

Builds the totalizer with a distance accessor built by Distance().

◆ Total() [2/2]

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 >::Total::Total ( Distance  __distance)
inlineexplicit

Builds the totalizer with a distance accessor.

Parameters
[in]__distanceDistance accessor for the arc weights.

Definition at line 814 of file shortest_path_common.H.

Member Function Documentation

◆ operator()()

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 >::Total::operator() ( typename GT::Arc *  a)
inline

Adds the weight of an arc to dist.

Parameters
[in]aThe arc.
Returns
true.
Exceptions
anythingthat the distance throws; dist is then unchanged.

Definition at line 822 of file shortest_path_common.H.

References Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::Total::dist, and Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::Total::distance.

Member Data Documentation

◆ dist

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 >::Total::dist = 0

◆ 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 >::Total::distance {}

Distance accessor for the arc weights.

Definition at line 803 of file shortest_path_common.H.

Referenced by Aleph::Shortest_Path_Base< GT, Distance, Itor, SA, HeapT >::Total::operator()().


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