52 start() =
range.min();
62 if (start_end.first() <= start_end.second())
65 start() = start_end.first();
66 size() = (start_end.second() - start_end.first());
97 if (this->start() < 0)
102 this->size() += this->start();
112 const label extra = touches ? 1 : 0;
116 this->size() &&
range.size()
121 && range.min() <= this->
max() + extra
125 this->
min() >= range.min()
126 && this->
min() <= range.max() + extra
140 else if (!
range.size())
152 newRange.clampSize();
206 return labelRange(
lower, total);
constexpr labelRange() noexcept
Default construct an empty range (0,0)
void resize(const label len)
Adjust allocated size of list.
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.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
A range or interval of labels defined by a start and a size.
A min/max value pair with additional methods. In addition to conveniently storing values...
int debugSwitch(const char *name, const int deflt=0)
Lookup debug switch or add default value.
string upper(const std::string &s)
Return string copy transformed with std::toupper on each character.
static int debug
Debugging.
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.
IntType max() const noexcept
The (inclusive) upper value of the range, same as rbegin_value(). Ill-defined for an empty 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 min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
iterator begin() noexcept
Return an iterator to begin traversing the UList.
labelRange join(const labelRange &range) const
Return a joined range, squashing any gaps in between.
string lower(const std::string &s)
Return string copy transformed with std::tolower on each character.
IntType min() const noexcept
The (inclusive) lower value of the range, same as start(), begin_value()
iterator end() noexcept
Return an iterator to end traversing the UList.
label size() const noexcept
The size of the range.
bool overlaps(const labelRange &range, bool touches=false) const
Return true if the ranges overlap.