14 template <
class InputIter,
class Tp,
class BinaryFunc>
15 void split(InputIter first, InputIter last, Tp sep, BinaryFunc f)
21 InputIter found = std::find(first, last, sep);
31 template <
class InputIter,
class SeparaterIter,
class BinaryFunc>
32 void split(InputIter first, InputIter last, SeparaterIter s_first, SeparaterIter s_last, BinaryFunc f)
38 InputIter found = std::find_first_of(first, last, s_first, s_last);
48 template <
class Range,
49 class Iter = decltype(std::begin(std::declval<Range>())),
50 class = decltype(std::end(std::declval<Range>()))>
55 typename std::iterator_traits<Iter>::difference_type i;
57 bool operator!=(iterator
const& other)
const {
return iter != other.iter; }
58 void operator++() { ++i; ++iter; }
59 auto operator*()
const {
return std::tie(i, *iter); }
65 auto begin() {
return iterator{0, std::begin(range)}; }
66 auto end() {
return iterator{0, std::end(range)}; }
69 return range_wrapper{std::forward<Range>(range)};
Contains all classes needed for solving linear and non linear equation systems.
Definition: AdaptBase.hpp:6
constexpr auto enumerate(Range &&range)
Provide python-like indexing iterator that returns a pair of [i,element].
Definition: Algorithm.hpp:51
void split(InputIter first, InputIter last, Tp sep, BinaryFunc f)
Split a sequence [first,last) by the separators sep and pass the tokens as begin-end iterator pair to...
Definition: Algorithm.hpp:15