A set of labels defined by a start, a length and a stride. More...
Classes | |
class | const_iterator |
Bidirectional input iterator with const access. More... | |
class | const_reverse_iterator |
Bidirectional reverse input iterator with const access. More... | |
class | indexer |
A value indexer, for iteration or generation. More... | |
Public Types | |
typedef label | value_type |
Type of values the range contains. More... | |
typedef label | size_type |
The type that can represent the size of the range. More... | |
Public Member Functions | |
constexpr | sliceRange () noexcept |
Default construct an empty slice (0,0,0) More... | |
constexpr | sliceRange (const label beg, const label len, const label stride) noexcept |
Construct slice from start/size/stride, no checks. More... | |
sliceRange (const FixedList< label, 3 > &coeffs) | |
Construct slice from start/size/stride coefficients, enforce non-negative size and stride. More... | |
bool | empty () const noexcept |
True if range is empty (zero-sized) More... | |
bool | good () const noexcept |
True if range has size greater than zero. More... | |
label | size () const noexcept |
The size of the range. More... | |
label & | size () noexcept |
Non-const access to size of the range. More... | |
label | start () const noexcept |
The (inclusive) lower value of the range. More... | |
label & | start () noexcept |
Non-const access to start of the range. More... | |
label | stride () const noexcept |
The stride for the range. More... | |
label & | stride () noexcept |
Non-const access to the stride. More... | |
label | min () const noexcept |
The (inclusive) lower value of the range, same as start() More... | |
label | max () const noexcept |
The (inclusive) upper value of the range. Ill-defined for an empty range. More... | |
List< label > | labels () const |
Return list of labels corresponding to the slice. More... | |
label | operator[] (const label i) const noexcept |
Return element in the range, without bounds checking. More... | |
operator bool () const noexcept | |
True if range has size greater than zero. Same as good() More... | |
indexer | generator () const |
Return a forward values generator. More... | |
const_iterator | at (const label i) const |
Return const_iterator to a position within the range, with bounds checking. More... | |
const_iterator | begin () const noexcept |
A const_iterator set to the beginning of the range. More... | |
const_iterator | cbegin () const noexcept |
A const_iterator set to the beginning of the range. More... | |
const_iterator | cend () const noexcept |
A const_iterator set to 1 beyond the end of the range. More... | |
const_iterator | end () const noexcept |
A const_iterator set to 1 beyond the end of the range. More... | |
const_reverse_iterator | rbegin () const noexcept |
A const_reverse_iterator set to 1 before the end of range. More... | |
const_reverse_iterator | crbegin () const noexcept |
A const_reverse_iterator set to 1 before the end of range. More... | |
const_reverse_iterator | rend () const noexcept |
A const_reverse_iterator set to 1 before the begin of range. More... | |
const_reverse_iterator | crend () const noexcept |
A const_reverse_iterator set to 1 before the begin of range. More... | |
A set of labels defined by a start, a length and a stride.
Definition at line 54 of file sliceRange.H.
typedef label value_type |
Type of values the range contains.
Definition at line 81 of file sliceRange.H.
typedef label size_type |
The type that can represent the size of the range.
Definition at line 86 of file sliceRange.H.
|
inlinenoexcept |
Default construct an empty slice (0,0,0)
Definition at line 23 of file sliceRangeI.H.
|
inlinenoexcept |
Construct slice from start/size/stride, no checks.
Definition at line 32 of file sliceRangeI.H.
|
explicit |
Construct slice from start/size/stride coefficients, enforce non-negative size and stride.
Definition at line 31 of file sliceRange.C.
|
inlinenoexcept |
True if range is empty (zero-sized)
Definition at line 133 of file sliceRange.H.
|
inlinenoexcept |
True if range has size greater than zero.
Definition at line 138 of file sliceRange.H.
|
inlinenoexcept |
The size of the range.
Definition at line 143 of file sliceRange.H.
Referenced by Foam::operator<(), and Foam::operator==().
|
inlinenoexcept |
Non-const access to size of the range.
Definition at line 148 of file sliceRange.H.
|
inlinenoexcept |
The (inclusive) lower value of the range.
Definition at line 153 of file sliceRange.H.
Referenced by Foam::operator<(), and Foam::operator==().
|
inlinenoexcept |
Non-const access to start of the range.
Definition at line 158 of file sliceRange.H.
|
inlinenoexcept |
The stride for the range.
Definition at line 163 of file sliceRange.H.
Referenced by Foam::operator<(), and Foam::operator==().
|
inlinenoexcept |
Non-const access to the stride.
Definition at line 168 of file sliceRange.H.
|
inlinenoexcept |
The (inclusive) lower value of the range, same as start()
Definition at line 174 of file sliceRange.H.
|
inlinenoexcept |
The (inclusive) upper value of the range. Ill-defined for an empty range.
Definition at line 180 of file sliceRange.H.
Foam::List< Foam::label > labels | ( | ) | const |
Return list of labels corresponding to the slice.
Definition at line 41 of file sliceRange.C.
References UList< T >::begin(), stdFoam::cbegin(), stdFoam::cend(), UList< T >::end(), and UList< T >::size().
|
inlinenoexcept |
Return element in the range, without bounds checking.
Definition at line 193 of file sliceRange.H.
|
inlineexplicitnoexcept |
True if range has size greater than zero. Same as good()
Definition at line 201 of file sliceRange.H.
|
inline |
Return a forward values generator.
Definition at line 289 of file sliceRangeI.H.
|
inline |
Return const_iterator to a position within the range, with bounds checking.
Definition at line 296 of file sliceRangeI.H.
|
inlinenoexcept |
A const_iterator set to the beginning of the range.
Definition at line 308 of file sliceRangeI.H.
|
inlinenoexcept |
A const_iterator set to the beginning of the range.
Definition at line 315 of file sliceRangeI.H.
|
inlinenoexcept |
A const_iterator set to 1 beyond the end of the range.
Definition at line 329 of file sliceRangeI.H.
|
inlinenoexcept |
A const_iterator set to 1 beyond the end of the range.
Definition at line 322 of file sliceRangeI.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the end of range.
Definition at line 336 of file sliceRangeI.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the end of range.
Definition at line 343 of file sliceRangeI.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the begin of range.
Definition at line 350 of file sliceRangeI.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the begin of range.
Definition at line 357 of file sliceRangeI.H.