21 #ifndef bempp_scattered_range_hpp
22 #define bempp_scattered_range_hpp
24 #include "../common/common.hpp"
26 #include <tbb/tbb_stddef.h>
39 m_value(value), m_end(end), m_step(step) {
44 m_value = std::min(m_value + m_step, m_end);
48 size_t value()
const {
57 operator size_t()
const {
62 size_t m_value, m_end, m_step;
66 m_begin(begin), m_end(end), m_step(step) {}
69 m_begin = range.m_begin + range.m_step;
71 m_step = range.m_step * 2;
76 return m_begin >= m_end;
79 bool is_divisible()
const {
80 return m_begin + m_step < m_end;
83 const_iterator begin()
const {
84 return const_iterator(m_begin, m_end, m_step);
87 const_iterator end()
const {
88 return const_iterator(m_end, m_end, m_step);
99 return (m_end - 1 - m_begin) / m_step + 1;
103 size_t m_begin, m_end, m_step;
Definition: scattered_range.hpp:36
Definition: scattered_range.hpp:33