Returns a length of the longest suffix of |a| that matches any prefix of |b|. Neither |a| nor |b| can contain several repetitions of any edge. Returns -1 if |a| intersection |b| is not equal to some suffix of |a| and some prefix of |b|.
| 213 | // Neither |a| nor |b| can contain several repetitions of any edge. |
| 214 | // Returns -1 if |a| intersection |b| is not equal to some suffix of |a| and some prefix of |b|. |
| 215 | int32_t PathOverlappingLen(Graph::EdgeVector const & a, Graph::EdgeVector const & b) |
| 216 | { |
| 217 | auto const len = IntersectionLen(a, b); |
| 218 | if (SuffixEqualsPrefix(a, b, len)) |
| 219 | return base::checked_cast<int32_t>(len); |
| 220 | |
| 221 | return -1; |
| 222 | } |
| 223 | |
| 224 | m2::PointD PointAtSegmentM(m2::PointD const & p1, m2::PointD const & p2, double const distanceM) |
| 225 | { |
no test coverage detected