Functions | |
template<typename FwIter , typename Func > | |
void | forEachPair (FwIter first, FwIter end, Func f) |
apply a function for each pair of adjacent elements in a range More... | |
template<typename FwIter , typename Func > | |
FwIter | forEachPairUntil (FwIter first, FwIter end, Func f) |
Apply a function of all pairs in a sequenc in sorted order until a predicate returns true. More... | |
void lanelet::helper::forEachPair | ( | FwIter | first, |
FwIter | end, | ||
Func | f | ||
) |
apply a function for each pair of adjacent elements in a range
first | first element in range |
end | past-the-end iterator |
f | function/lambda to apply (defines operator()) |
This is useful for iterating over a the segments in a LineString.
Definition at line 15 of file GeometryHelper.h.
FwIter lanelet::helper::forEachPairUntil | ( | FwIter | first, |
FwIter | end, | ||
Func | f | ||
) |
Apply a function of all pairs in a sequenc in sorted order until a predicate returns true.
first | begin of the range to iterate over |
end | end of the range to iterate over |
f | function returning something convertible to bool. If the result is true, the iteration is stopped |
Works similar to forEachPair but stops if f returns true. Useful for implementing a search on segments.
Definition at line 38 of file GeometryHelper.h.