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

Function GetNeighbourIntermediatePoints

libs/routing/guides_connections.cpp:139–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139std::vector<size_t> GetNeighbourIntermediatePoints(size_t checkpointIdx, size_t checkpointsCount)
140{
141 CHECK_GREATER(checkpointsCount, 2, (checkpointsCount));
142 std::vector<size_t> neighbours;
143 // We add left intermediate point:
144 if (checkpointIdx > 1)
145 neighbours.push_back(checkpointIdx - 1);
146 // We add right intermediate point:
147 if (checkpointIdx < checkpointsCount - 2)
148 neighbours.push_back(checkpointIdx + 1);
149 return neighbours;
150}
151
152bool GuidesConnections::FitsForDirectLinkToGuide(size_t checkpointIdx, size_t checkpointsCount) const
153{

Callers 1

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected