11 template <
typename T, std::
size_t D >
19 : m_min(min), m_max(max) {}
21 Vector &
min() {
return m_min; }
22 Vector &
max() {
return m_max; }
23 const Vector &
min()
const {
return m_min; }
24 const Vector &
max()
const {
return m_max; }
30 template <
typename T, std::
size_t D,
typename TNDIterator >
43 Vector &
pos() {
return m_pos; }
47 if (++m_pos[0] < this->
max()[0])
52 m_pos[0] = this->
min()[0];
53 for (std::size_t i = 1; i < D; ++i)
55 if (++m_pos[i] < this->
max()[i])
break;
56 m_pos[i] = this->
min()[i];
57 set_coord(m_i, i, m_pos[i]);
70 template <
typename T, std::
size_t D >
85 : Base(minBounds, maxBounds) {};
102 {
return this->max_bounds() - this->min_bounds() + 1; }
rectangular_range_indicator(const Base &rec, const Vector &pos)
rectangular_range< T, D > Base
rectangular_range_indicator(const Vector &min, const Vector &max, const Vector &pos)
Range()
Default constructor.
const Vector & min() const
Belongs to package Box Do not include directly, include til/Box.h instead.
Describe integer cube ranges (e.g.
This file contains forward declarations of classes defined in the TIL library.
Range(const numeric_array< T, D > &minBounds, const numeric_array< T, D > &maxBounds)
Set range bounds in all dimensions.
rectangular_range_indicator(const Base &rec)
Range(const numeric_array< T, D > &maxBounds)
Set max bounds, assuming min bounds are zeros.
rectangular_range_indicator(const Vector &min, const Vector &max)
numeric_array< T, D > dims() const
Get range size.
A 3D box parallel to canonical axes.
const Vector & max() const
rectangular_range(const Vector &min, const Vector &max)