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

Method ChooseNearestSegment

tools/track_analyzing/track_matcher.cpp:214–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214void TrackMatcher::Step::ChooseNearestSegment()
215{
216 CHECK(!m_candidates.empty(), ());
217
218 double minDistance = numeric_limits<double>::max();
219
220 for (Candidate const & candidate : m_candidates)
221 {
222 if (candidate.GetDistance() < minDistance)
223 {
224 minDistance = candidate.GetDistance();
225 m_segment = candidate.GetSegment();
226 }
227 }
228}
229
230void TrackMatcher::Step::AddCandidate(Segment const & segment, double distance, IndexGraph const & graph)
231{

Callers 1

MatchTrackMethod · 0.80

Calls 3

GetSegmentMethod · 0.80
emptyMethod · 0.45
GetDistanceMethod · 0.45

Tested by

no test coverage detected