MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / strictlyLess

Function strictlyLess

include/extractor/road_classification.hpp:169–177  ·  view source on GitHub ↗

LHS road classification is strictly less than RHS, if it belongs to a lower general category of roads. E.g. normal city roads are strictly less of a priority than a motorway and alleys are strictly less than inner-city roads.

Source from the content-addressed store, hash-verified

167// of roads. E.g. normal city roads are strictly less of a priority than a motorway and alleys
168// are strictly less than inner-city roads.
169inline bool strictlyLess(const RoadClassification lhs, const RoadClassification rhs)
170{
171 if (!lhs.IsLowPriorityRoadClass() && rhs.IsLowPriorityRoadClass())
172 return false;
173 if (lhs.IsLowPriorityRoadClass() && !rhs.IsLowPriorityRoadClass())
174 return true;
175
176 return getRoadGroup(lhs) > getRoadGroup(rhs);
177}
178
179// check whether a link class is the fitting link class to a road
180inline bool isLinkTo(const RoadClassification link, const RoadClassification road)

Callers 2

roadHasLowerClassFunction · 0.85
findObviousTurnMethod · 0.85

Calls 2

getRoadGroupFunction · 0.85

Tested by

no test coverage detected