PGROUTING  2.5
Pgr_dijkstra< G >::dijkstra_many_goal_visitor Class Reference

class for stopping when all targets are found More...

Inheritance diagram for Pgr_dijkstra< G >::dijkstra_many_goal_visitor:
Collaboration diagram for Pgr_dijkstra< G >::dijkstra_many_goal_visitor:

Public Member Functions

 dijkstra_many_goal_visitor (std::vector< V > goals)
 
template<class B_G >
void examine_vertex (V u, B_G &)
 

Private Attributes

std::set< Vm_goals
 

Detailed Description

template<class G>
class Pgr_dijkstra< G >::dijkstra_many_goal_visitor

class for stopping when all targets are found

Definition at line 726 of file pgr_dijkstra.hpp.

Constructor & Destructor Documentation

template<class G>
Pgr_dijkstra< G >::dijkstra_many_goal_visitor::dijkstra_many_goal_visitor ( std::vector< V goals)
inlineexplicit

Definition at line 728 of file pgr_dijkstra.hpp.

729  :m_goals(goals.begin(), goals.end()) {}

Member Function Documentation

template<class G>
template<class B_G >
void Pgr_dijkstra< G >::dijkstra_many_goal_visitor::examine_vertex ( V  u,
B_G &   
)
inline

Definition at line 731 of file pgr_dijkstra.hpp.

731  {
732  auto s_it = m_goals.find(u);
733  if (s_it == m_goals.end()) return;
734  // we found one more goal
735  m_goals.erase(s_it);
736  if (m_goals.size() == 0) throw found_goals();
737  }

Member Data Documentation

template<class G>
std::set< V > Pgr_dijkstra< G >::dijkstra_many_goal_visitor::m_goals
private

Definition at line 739 of file pgr_dijkstra.hpp.


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