Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor > Class Template Reference

Detailed Description

template<class GraphType, class DistanceType, class ArcLengthFunctor = internal::ElementGetter< DistanceType, typename GraphType::ArcIndex>>
class operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >

Definition at line 119 of file bounded_dijkstra.h.

#include <bounded_dijkstra.h>

Public Types

typedef GraphType::NodeIndex NodeIndex
typedef GraphType::ArcIndex ArcIndex
typedef DistanceType distance_type
template<typename T>
using ByNode = internal::IndexedVector<NodeIndex, T>
template<typename T>
using ByArc = internal::IndexedVector<ArcIndex, T>

Public Member Functions

 BoundedDijkstraWrapper (const GraphType *graph, const ByArc< DistanceType > *arc_lengths)
 BoundedDijkstraWrapper (const GraphType *graph, ArcLengthFunctor arc_length_functor)
const std::vector< NodeIndex > & RunBoundedDijkstra (NodeIndex source_node, DistanceType distance_limit)
bool OneToOneShortestPath (NodeIndex from, NodeIndex to, DistanceType distance_limit)
const std::vector< NodeIndex > & RunBoundedDijkstraFromMultipleSources (const std::vector< std::pair< NodeIndex, DistanceType > > &sources_with_distance_offsets, DistanceType distance_limit)
std::vector< NodeIndexRunBoundedDijkstraFromMultipleSourcesToMultipleDestinations (const std::vector< std::pair< NodeIndex, DistanceType > > &sources_with_distance_offsets, const std::vector< std::pair< NodeIndex, DistanceType > > &destinations_with_distance_offsets, int num_destinations_to_reach, DistanceType distance_limit)
const std::vector< NodeIndex > & RunBoundedDijkstraWithSettledNodeCallback (const std::vector< std::pair< NodeIndex, DistanceType > > &sources_with_distance_offsets, std::function< void(NodeIndex settled_node, DistanceType settled_distance, DistanceType *distance_limit)> settled_node_callback, DistanceType distance_limit)
bool IsReachable (NodeIndex node) const
const ByNode< NodeIndex > & reached_nodes () const
const ByNode< DistanceType > & distances () const
const ByNode< NodeIndex > & parents () const
const ByNode< ArcIndex > & arc_from_source () const
std::vector< ArcIndexArcPathTo (NodeIndex node) const
std::vector< ArcIndexArcPathToNode (NodeIndex node) const
std::vector< NodeIndexNodePathTo (NodeIndex node) const
NodeIndex SourceOfShortestPathToNode (NodeIndex node) const
int GetSourceIndex (NodeIndex node) const
int GetDestinationIndex (NodeIndex node) const
const GraphType & graph () const
const ByArc< DistanceType > & arc_lengths () const
DistanceType GetArcLength (ArcIndex arc) const

Member Typedef Documentation

◆ ArcIndex

template<class GraphType, class DistanceType, class ArcLengthFunctor = internal::ElementGetter< DistanceType, typename GraphType::ArcIndex>>
typedef GraphType::ArcIndex operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::ArcIndex

Definition at line 122 of file bounded_dijkstra.h.

◆ ByArc

template<class GraphType, class DistanceType, class ArcLengthFunctor = internal::ElementGetter< DistanceType, typename GraphType::ArcIndex>>
template<typename T>
using operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::ByArc = internal::IndexedVector<ArcIndex, T>

Definition at line 129 of file bounded_dijkstra.h.

◆ ByNode

template<class GraphType, class DistanceType, class ArcLengthFunctor = internal::ElementGetter< DistanceType, typename GraphType::ArcIndex>>
template<typename T>
using operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::ByNode = internal::IndexedVector<NodeIndex, T>

Definition at line 127 of file bounded_dijkstra.h.

◆ distance_type

template<class GraphType, class DistanceType, class ArcLengthFunctor = internal::ElementGetter< DistanceType, typename GraphType::ArcIndex>>
typedef DistanceType operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::distance_type

Definition at line 123 of file bounded_dijkstra.h.

◆ NodeIndex

template<class GraphType, class DistanceType, class ArcLengthFunctor = internal::ElementGetter< DistanceType, typename GraphType::ArcIndex>>
typedef GraphType::NodeIndex operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::NodeIndex

Definition at line 121 of file bounded_dijkstra.h.

Constructor & Destructor Documentation

◆ BoundedDijkstraWrapper() [1/2]

template<class GraphType, class DistanceType, class ArcLengthFunctor>
operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::BoundedDijkstraWrapper ( const GraphType * graph,
const ByArc< DistanceType > * arc_lengths )

Definition at line 351 of file bounded_dijkstra.h.

◆ BoundedDijkstraWrapper() [2/2]

template<class GraphType, class DistanceType, class ArcLengthFunctor>
operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::BoundedDijkstraWrapper ( const GraphType * graph,
ArcLengthFunctor arc_length_functor )

Definition at line 365 of file bounded_dijkstra.h.

Member Function Documentation

◆ arc_from_source()

template<class GraphType, class DistanceType, class ArcLengthFunctor = internal::ElementGetter< DistanceType, typename GraphType::ArcIndex>>
const ByNode< ArcIndex > & operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::arc_from_source ( ) const
inline

Definition at line 242 of file bounded_dijkstra.h.

◆ arc_lengths()

template<class GraphType, class DistanceType, class ArcLengthFunctor = internal::ElementGetter< DistanceType, typename GraphType::ArcIndex>>
const ByArc< DistanceType > & operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::arc_lengths ( ) const
inline

Definition at line 281 of file bounded_dijkstra.h.

◆ ArcPathTo()

template<class GraphType, class DistanceType, class ArcLengthFunctor>
std::vector< typename GraphType::ArcIndex > operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::ArcPathTo ( NodeIndex node) const

Definition at line 605 of file bounded_dijkstra.h.

◆ ArcPathToNode()

template<class GraphType, class DistanceType, class ArcLengthFunctor = internal::ElementGetter< DistanceType, typename GraphType::ArcIndex>>
std::vector< ArcIndex > operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::ArcPathToNode ( NodeIndex node) const
inline

Definition at line 249 of file bounded_dijkstra.h.

◆ distances()

template<class GraphType, class DistanceType, class ArcLengthFunctor = internal::ElementGetter< DistanceType, typename GraphType::ArcIndex>>
const ByNode< DistanceType > & operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::distances ( ) const
inline

Definition at line 229 of file bounded_dijkstra.h.

◆ GetArcLength()

template<class GraphType, class DistanceType, class ArcLengthFunctor = internal::ElementGetter< DistanceType, typename GraphType::ArcIndex>>
DistanceType operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::GetArcLength ( ArcIndex arc) const
inline

Definition at line 285 of file bounded_dijkstra.h.

◆ GetDestinationIndex()

template<class GraphType, class DistanceType, class ArcLengthFunctor>
int operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::GetDestinationIndex ( NodeIndex node) const

Definition at line 658 of file bounded_dijkstra.h.

◆ GetSourceIndex()

template<class GraphType, class DistanceType, class ArcLengthFunctor>
int operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::GetSourceIndex ( NodeIndex node) const

Definition at line 650 of file bounded_dijkstra.h.

◆ graph()

template<class GraphType, class DistanceType, class ArcLengthFunctor = internal::ElementGetter< DistanceType, typename GraphType::ArcIndex>>
const GraphType & operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::graph ( ) const
inline

Definition at line 280 of file bounded_dijkstra.h.

◆ IsReachable()

template<class GraphType, class DistanceType, class ArcLengthFunctor = internal::ElementGetter< DistanceType, typename GraphType::ArcIndex>>
bool operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::IsReachable ( NodeIndex node) const
inline

Definition at line 218 of file bounded_dijkstra.h.

◆ NodePathTo()

template<class GraphType, class DistanceType, class ArcLengthFunctor>
std::vector< typename GraphType::NodeIndex > operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::NodePathTo ( NodeIndex node) const

Definition at line 623 of file bounded_dijkstra.h.

◆ OneToOneShortestPath()

template<class GraphType, class DistanceType, class ArcLengthFunctor>
bool operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::OneToOneShortestPath ( NodeIndex from,
NodeIndex to,
DistanceType distance_limit )

Definition at line 476 of file bounded_dijkstra.h.

◆ parents()

template<class GraphType, class DistanceType, class ArcLengthFunctor = internal::ElementGetter< DistanceType, typename GraphType::ArcIndex>>
const ByNode< NodeIndex > & operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::parents ( ) const
inline

Definition at line 238 of file bounded_dijkstra.h.

◆ reached_nodes()

template<class GraphType, class DistanceType, class ArcLengthFunctor = internal::ElementGetter< DistanceType, typename GraphType::ArcIndex>>
const ByNode< NodeIndex > & operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::reached_nodes ( ) const
inline

Definition at line 221 of file bounded_dijkstra.h.

◆ RunBoundedDijkstra()

template<class GraphType, class DistanceType, class ArcLengthFunctor = internal::ElementGetter< DistanceType, typename GraphType::ArcIndex>>
const std::vector< NodeIndex > & operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::RunBoundedDijkstra ( NodeIndex source_node,
DistanceType distance_limit )
inline

Definition at line 149 of file bounded_dijkstra.h.

◆ RunBoundedDijkstraFromMultipleSources()

template<class GraphType, class DistanceType, class ArcLengthFunctor>
const std::vector< typename GraphType::NodeIndex > & operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::RunBoundedDijkstraFromMultipleSources ( const std::vector< std::pair< NodeIndex, DistanceType > > & sources_with_distance_offsets,
DistanceType distance_limit )

Definition at line 381 of file bounded_dijkstra.h.

◆ RunBoundedDijkstraFromMultipleSourcesToMultipleDestinations()

template<class GraphType, class DistanceType, class ArcLengthFunctor>
std::vector< typename GraphType::NodeIndex > operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::RunBoundedDijkstraFromMultipleSourcesToMultipleDestinations ( const std::vector< std::pair< NodeIndex, DistanceType > > & sources_with_distance_offsets,
const std::vector< std::pair< NodeIndex, DistanceType > > & destinations_with_distance_offsets,
int num_destinations_to_reach,
DistanceType distance_limit )

Definition at line 392 of file bounded_dijkstra.h.

◆ RunBoundedDijkstraWithSettledNodeCallback()

template<class GraphType, class DistanceType, class ArcLengthFunctor>
const std::vector< typename GraphType::NodeIndex > & operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::RunBoundedDijkstraWithSettledNodeCallback ( const std::vector< std::pair< NodeIndex, DistanceType > > & sources_with_distance_offsets,
std::function< void(NodeIndex settled_node, DistanceType settled_distance, DistanceType *distance_limit)> settled_node_callback,
DistanceType distance_limit )

Definition at line 497 of file bounded_dijkstra.h.

◆ SourceOfShortestPathToNode()

template<class GraphType, class DistanceType, class ArcLengthFunctor>
GraphType::NodeIndex operations_research::BoundedDijkstraWrapper< GraphType, DistanceType, ArcLengthFunctor >::SourceOfShortestPathToNode ( NodeIndex node) const

Definition at line 642 of file bounded_dijkstra.h.


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