| 212 | } |
| 213 | |
| 214 | void 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 | |
| 230 | void TrackMatcher::Step::AddCandidate(Segment const & segment, double distance, IndexGraph const & graph) |
| 231 | { |
no test coverage detected