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

Method CalcGuidesSegmentWeight

libs/routing/index_graph_starter.cpp:238–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238RouteWeight IndexGraphStarter::CalcGuidesSegmentWeight(Segment const & segment, EdgeEstimator::Purpose purpose) const
239{
240 if (purpose == EdgeEstimator::Purpose::Weight)
241 return m_guides.CalcSegmentWeight(segment);
242
243 auto [from, to] = m_guides.GetFromTo(segment);
244 return m_graph.CalcOffroadWeight(from.GetLatLon(), to.GetLatLon(), purpose);
245}
246
247RouteWeight IndexGraphStarter::CalcSegmentWeight(Segment const & segment, EdgeEstimator::Purpose purpose) const
248{

Callers

nothing calls this directly

Calls 4

GetFromToMethod · 0.80
CalcSegmentWeightMethod · 0.45
CalcOffroadWeightMethod · 0.45
GetLatLonMethod · 0.45

Tested by

no test coverage detected