PGROUTING  3.2
pgrouting::algorithms::Pgr_astar< G >::astar_many_goals_visitor Class Reference

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

Inheritance diagram for pgrouting::algorithms::Pgr_astar< G >::astar_many_goals_visitor:
Collaboration diagram for pgrouting::algorithms::Pgr_astar< G >::astar_many_goals_visitor:

Public Member Functions

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

Private Attributes

std::set< Vm_goals
 

Detailed Description

template<class G>
class pgrouting::algorithms::Pgr_astar< G >::astar_many_goals_visitor

class for stopping when all targets are found

Definition at line 302 of file pgr_astar.hpp.

Constructor & Destructor Documentation

◆ astar_many_goals_visitor()

template<class G >
pgrouting::algorithms::Pgr_astar< G >::astar_many_goals_visitor::astar_many_goals_visitor ( const std::vector< V > &  goals)
inlineexplicit

Definition at line 304 of file pgr_astar.hpp.

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

Member Function Documentation

◆ examine_vertex()

template<class G >
template<class B_G >
void pgrouting::algorithms::Pgr_astar< G >::astar_many_goals_visitor::examine_vertex ( V  u,
B_G g 
)
inline

Definition at line 307 of file pgr_astar.hpp.

307  {
308  auto s_it = m_goals.find(u);
309  if (s_it == m_goals.end()) return;
310  // found one more goal
311  m_goals.erase(s_it);
312  if (m_goals.size() == 0) throw found_goals();
313  num_edges(g);
314  }

References pgrouting::algorithms::Pgr_astar< G >::astar_many_goals_visitor::m_goals.

Member Data Documentation

◆ m_goals

template<class G >
std::set< V > pgrouting::algorithms::Pgr_astar< G >::astar_many_goals_visitor::m_goals
private

The documentation for this class was generated from the following file:
pgrouting::algorithms::Pgr_astar::astar_many_goals_visitor::m_goals
std::set< V > m_goals
Definition: pgr_astar.hpp:316