itertools::stride

#include <itertools.hpp>

Synopsis

template<typename T>
detail::strided<T> stride (T && range, std::ptrdiff_t stride)

Lazy-stride a range. This function returns itself a subrange of the initial range by considering only every N-th element

Parameters

  • range The range to take the subrange of

  • stride The numer of elements to skip