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

Function PassesRestrictionV3

tools/openlr/helpers.cpp:167–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167bool PassesRestrictionV3(Graph::Edge const & e, FunctionalRoadClass functionalRoadClass, FormOfWay formOfWay,
168 RoadInfoGetter & infoGetter, Score & score)
169{
170 CHECK(!e.IsFake(), ("Edges should not be fake:", e));
171 auto const frcScore = GetFrcScore(e, functionalRoadClass, infoGetter);
172 if (!frcScore)
173 return false;
174
175 score = *frcScore;
176 Score constexpr kScoreForFormOfWay = 25;
177 if (formOfWay == FormOfWay::Roundabout && infoGetter.Get(e.GetFeatureId()).m_isRoundabout)
178 score += kScoreForFormOfWay;
179
180 return true;
181}
182
183bool ConformLfrcnp(Graph::Edge const & e, FunctionalRoadClass lowestFrcToNextPoint, int frcThreshold,
184 RoadInfoGetter & infoGetter)

Callers 1

GetAllSuitablePathsMethod · 0.85

Calls 4

GetFrcScoreFunction · 0.85
IsFakeMethod · 0.45
GetMethod · 0.45
GetFeatureIdMethod · 0.45

Tested by

no test coverage detected