PGROUTING  2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Pgr_dijkstra< G > Class Template Reference

#include "pgr_dijkstra.hpp"

Classes

class  dijkstra_distance_visitor
 class for stopping when a distance/cost has being surpassed More...
 
class  dijkstra_many_goal_visitor
 class for stopping when all targets are found More...
 
class  dijkstra_one_goal_visitor
 class for stopping when 1 target is found More...
 
struct  found_goals
 exception for termination More...
 

Public Types

typedef G::V V
 

Public Member Functions

drivingDistance
Path drivingDistance (G &graph, int64_t start_vertex, double distance)
 1 to distance More...
 
std::deque< PathdrivingDistance (G &graph, std::vector< int64_t > start_vertex, double distance, bool equiCostFlag)
 many to distance More...
 
Dijkstra
Path dijkstra (G &graph, int64_t start_vertex, int64_t end_vertex, bool only_cost=false)
 one to one More...
 
std::deque< Pathdijkstra (G &graph, const std::vector< int64_t > &start_vertex, int64_t end_vertex, bool only_cost=false)
 Many to one. More...
 
std::deque< Pathdijkstra (G &graph, const std::vector< int64_t > &start_vertex, const std::vector< int64_t > &end_vertex, bool only_cost=false)
 Many to Many. More...
 
std::deque< Pathdijkstra (G &graph, int64_t start_vertex, const std::vector< int64_t > &end_vertex, bool only_cost=false)
 one to Many More...
 

Private Member Functions

void clear ()
 
bool dijkstra_1_to_1 (G &graph, V source, V target)
 Call to Dijkstra 1 source to 1 target. More...
 
bool dijkstra_1_to_distance (G &graph, V source, double distance)
 Call to Dijkstra 1 source to distance. More...
 
bool dijkstra_1_to_many (G &graph, V source, const std::vector< V > &targets)
 Call to Dijkstra 1 source to many targets. More...
 
std::deque< Pathget_paths (const G &graph, V source, std::vector< V > &targets, bool only_cost) const
 

Private Attributes

members;
std::vector< Vpredecessors
 
std::vector< double > distances
 
std::deque< VnodesInDistance
 

Detailed Description

template<class G>
class Pgr_dijkstra< G >

Definition at line 47 of file pgr_dijkstra.hpp.

Member Typedef Documentation

template<class G>
typedef G::V Pgr_dijkstra< G >::V

Definition at line 148 of file pgr_dijkstra.hpp.

Member Function Documentation

template<class G>
void Pgr_dijkstra< G >::clear ( )
inlineprivate
template<class G >
Path Pgr_dijkstra< G >::dijkstra ( G &  graph,
int64_t  start_vertex,
int64_t  end_vertex,
bool  only_cost = false 
)

one to one

Dijkstra 1 to 1.

Definition at line 394 of file pgr_dijkstra.hpp.

Referenced by Pgr_ksp< G >::doNextCycle(), Pgr_ksp< G >::getFirstSolution(), and pgr_dijkstra().

template<class G >
std::deque< Path > Pgr_dijkstra< G >::dijkstra ( G &  graph,
const std::vector< int64_t > &  start_vertex,
int64_t  end_vertex,
bool  only_cost = false 
)

Many to one.

Definition at line 471 of file pgr_dijkstra.hpp.

References Path::start_id().

template<class G >
std::deque< Path > Pgr_dijkstra< G >::dijkstra ( G &  graph,
const std::vector< int64_t > &  start_vertex,
const std::vector< int64_t > &  end_vertex,
bool  only_cost = false 
)

Many to Many.

Definition at line 494 of file pgr_dijkstra.hpp.

References Path::end_id(), and Path::start_id().

template<class G >
std::deque< Path > Pgr_dijkstra< G >::dijkstra ( G &  graph,
int64_t  start_vertex,
const std::vector< int64_t > &  end_vertex,
bool  only_cost = false 
)

one to Many

Dijkstra 1 to many.

Definition at line 429 of file pgr_dijkstra.hpp.

References Path::end_id().

template<class G >
bool Pgr_dijkstra< G >::dijkstra_1_to_1 ( G &  graph,
V  source,
V  target 
)
private

Call to Dijkstra 1 source to 1 target.

Definition at line 521 of file pgr_dijkstra.hpp.

template<class G >
bool Pgr_dijkstra< G >::dijkstra_1_to_distance ( G &  graph,
V  source,
double  distance 
)
private

Call to Dijkstra 1 source to distance.

Definition at line 544 of file pgr_dijkstra.hpp.

template<class G >
bool Pgr_dijkstra< G >::dijkstra_1_to_many ( G &  graph,
V  source,
const std::vector< V > &  targets 
)
private

Call to Dijkstra 1 source to many targets.

Definition at line 566 of file pgr_dijkstra.hpp.

template<class G >
Path Pgr_dijkstra< G >::drivingDistance ( G &  graph,
int64_t  start_vertex,
double  distance 
)

1 to distance

Definition at line 360 of file pgr_dijkstra.hpp.

References Path_t::agg_cost, Path_t::node, path, and Path::push_back().

Referenced by pgr_drivingDistance().

template<class G >
std::deque< Path > Pgr_dijkstra< G >::drivingDistance ( G &  graph,
std::vector< int64_t >  start_vertex,
double  distance,
bool  equiCostFlag 
)

many to distance

Definition at line 335 of file pgr_dijkstra.hpp.

template<class G>
std::deque<Path> Pgr_dijkstra< G >::get_paths ( const G &  graph,
V  source,
std::vector< V > &  targets,
bool  only_cost 
) const
inlineprivate

Member Data Documentation

template<class G>
std::vector< double > Pgr_dijkstra< G >::distances
private

Definition at line 250 of file pgr_dijkstra.hpp.

Referenced by Pgr_dijkstra< G >::clear(), and Pgr_dijkstra< G >::get_paths().

template<class G>
std::deque< V > Pgr_dijkstra< G >::nodesInDistance
private

Definition at line 251 of file pgr_dijkstra.hpp.

Referenced by Pgr_dijkstra< G >::clear().

template<class G>
std::vector< V > Pgr_dijkstra< G >::predecessors
private

Definition at line 249 of file pgr_dijkstra.hpp.

Referenced by Pgr_dijkstra< G >::clear(), and Pgr_dijkstra< G >::get_paths().


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