39 #ifndef Foam_labelRange_H 40 #define Foam_labelRange_H 50 template<
class T>
class MinMax;
98 const
bool adjustStart
139 const
bool adjustStart
197 template<
class>
struct labelRangeOp;
void reset(const label beg, const label end, const bool adjustStart) noexcept
Reset start and length, enforces non-negative size.
constexpr labelRange() noexcept
Default construct an empty range (0,0)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void adjust() noexcept
Adjust the start to avoid negative indices.
An interval of (signed) integers defined by a start and a size.
A range or interval of labels defined by a start and a size.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
A min/max value pair with additional methods. In addition to conveniently storing values...
label after() const noexcept
The value after the last element in the range.
static int debug
Debugging.
label end_value() const noexcept
The value 1 beyond the end of the range.
List< label > labels() const
Return list of labels corresponding to the range.
labelRange subset0(const label size) const
Calculate the intersection with the given 0/size range.
labelRange subset(const labelRange &range) const
Calculate the intersection of the range with another.
label start() const noexcept
The (inclusive) lower value of the range.
label before() const noexcept
The value before the start of the range.
labelRange join(const labelRange &range) const
Return a joined range, squashing any gaps in between.
const_iterator end() const noexcept
A const_iterator set to 1 beyond the end of the range.
bool valid() const noexcept
Deprecated(2020-09) True if range is non-empty.
bool empty() const noexcept
True if range is empty (zero-sized)
label rend_value() const noexcept
The value 1 before the begin of range.
label size() const noexcept
The size of the range.
bool overlaps(const labelRange &range, bool touches=false) const
Return true if the ranges overlap.
constexpr IntRange() noexcept
Default construct an empty range (0,0)