23 const std::vector<size_t>& indices,
24 std::function<
void(
const size_t,
const size_t)> to_execute) {
27 while (start_pos < indices.size()) {
28 size_t end_pos = indices.size();
29 for (
size_t i = start_pos + 1; i < indices.size(); ++i) {
30 if (indices[i] != indices[i - 1] + 1) {
35 to_execute(start_pos, end_pos);
void execute_over_contiguous_indices(const std::vector< size_t > &indices, std::function< void(const size_t, const size_t)> to_execute)