30 template<
class IntType>
39 template<
class IntType>
48 template<
class IntType>
64 template<
class IntType>
67 return (start_ + ((i < 0 || i > size_) ? size_ : i));
71 template<
class IntType>
72 inline constexpr IntType
79 template<
class IntType>
80 inline constexpr IntType
83 return (start_ + size_);
87 template<
class IntType>
88 inline constexpr IntType
91 return (start_ + (size_ - 1));
95 template<
class IntType>
96 inline constexpr IntType
103 template<
class IntType>
112 template<
class IntType>
121 template<
class IntType>
135 template<
class IntType>
136 inline constexpr
bool 140 return (size_ && start_ <= value && (value - start_) < size_);
144 template<
class IntType>
145 template<
class IntT2>
146 inline constexpr
bool 149 const auto& a = *
this;
153 a.start() ==
b.start()
154 && a.size() ==
b.size()
155 && a.total() ==
b.total()
160 template<
class IntType>
161 template<
class IntT2>
165 const auto& a = *
this;
167 if (a.start() <
b.start())
return -1;
168 if (
b.start() < a.start())
return +1;
170 if (a.size() <
b.size())
return -1;
171 if (
b.size() < a.size())
return +1;
173 if (a.total() <
b.total())
return -1;
174 if (
b.total() < a.total())
return +1;
182 template<
class IntType>
183 inline constexpr IntType
constexpr bool equals(const OffsetRange< T2 > &) const noexcept
Test equality of start/size/total.
constexpr bool contains(IntType value) const noexcept
True if the value is between the start and size range range.
void clear() noexcept
Reset to zero.
constexpr IntType begin_value() const noexcept
The value at the beginning of the start/size range - same as start()
constexpr IntType rend_value() const noexcept
The value 1 before the begin of start/size range.
constexpr IntType operator[](IntType i) const noexcept
Offset dereference, without bounds checking.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
constexpr int compare(const OffsetRange< T2 > &) const noexcept
Compare start/size/total in that order.
A tuple of integers comprising start, size, total.
constexpr IntType rbegin_value() const noexcept
The max value of the start/size range.
constexpr IntType end_value() const noexcept
The value 1 beyond the end of the start/size range.
constexpr OffsetRange() noexcept
Default construct as (0,0,0)
void reset(IntType len) noexcept
Reset to the specified size, with start=0 and total=size.