MCPcopy Create free account
hub / github.com/comaps/comaps / GetDistance

Method GetDistance

libs/routing/base/astar_algorithm.hpp:139–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137 bool HasDistance(Vertex const & vertex) const { return m_distanceMap.find(vertex) != m_distanceMap.cend(); }
138
139 Weight GetDistance(Vertex const & vertex) const
140 {
141 auto const & it = m_distanceMap.find(vertex);
142 if (it == m_distanceMap.cend())
143 return kInfiniteDistance;
144
145 return it->second;
146 }
147
148 void SetDistance(Vertex const & vertex, Weight const & distance) { m_distanceMap[vertex] = distance; }
149

Callers 4

PropagateWaveMethod · 0.45
FindPathMethod · 0.45
AdjustRouteMethod · 0.45

Calls 2

findMethod · 0.45
cendMethod · 0.45

Tested by

no test coverage detected