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) | |
constexpr label | start () const noexcept |
The first/start value in the range (inclusive) More... | |
constexpr label | size () const noexcept |
The size of the range. More... | |
constexpr label | stride () const noexcept |
The stride for the range. More... | |
bool | empty () const noexcept |
True if range is empty (zero-sized) More... | |
constexpr label | first () const noexcept |
The first/start value in the range (inclusive) More... | |
label | last () const noexcept |
The (inclusive) upper value of the 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 is non-empty. More... | |
indexer | generator () const |
Return a forward values generator. More... | |
const_iterator | at (const label i) const |
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 58 of file sliceRange.H.
typedef label value_type |
Type of values the range contains.
Definition at line 77 of file sliceRange.H.
typedef label size_type |
The type that can represent the size of the range.
Definition at line 80 of file sliceRange.H.
|
inlineconstexprnoexcept |
Default construct an empty slice (0,0,0)
Definition at line 32 of file sliceRangeI.H.
|
inlineconstexprnoexcept |
Construct slice from start/size/stride, no checks.
Definition at line 41 of file sliceRangeI.H.
|
explicit |
Construct slice from start/size/stride coefficients, enforce non-negative size and stride.
Definition at line 36 of file sliceRange.C.
|
inlineconstexprnoexcept |
The first/start value in the range (inclusive)
Definition at line 115 of file sliceRange.H.
|
inlineconstexprnoexcept |
The size of the range.
Definition at line 121 of file sliceRange.H.
Referenced by Foam::operator<(), and Foam::operator==().
|
inlineconstexprnoexcept |
The stride for the range.
Definition at line 127 of file sliceRange.H.
Referenced by Foam::operator<(), and Foam::operator==().
|
inlinenoexcept |
True if range is empty (zero-sized)
Definition at line 133 of file sliceRange.H.
|
inlineconstexprnoexcept |
The first/start value in the range (inclusive)
Definition at line 139 of file sliceRange.H.
Referenced by Foam::operator<(), and Foam::operator==().
|
inlinenoexcept |
The (inclusive) upper value of the range.
Definition at line 145 of file sliceRange.H.
Foam::List< Foam::label > labels | ( | ) | const |
Return list of labels corresponding to the slice.
Definition at line 46 of file sliceRange.C.
References stdFoam::cbegin(), and stdFoam::cend().
|
inlinenoexcept |
Return element in the range, without bounds checking.
Definition at line 157 of file sliceRange.H.
|
inlineexplicitnoexcept |
|
inline |
Return a forward values generator.
Definition at line 298 of file sliceRangeI.H.
|
inline |
Return const_iterator to a position within the range, with bounds checking.
Definition at line 305 of file sliceRangeI.H.
|
inlinenoexcept |
A const_iterator set to the beginning of the range.
Definition at line 317 of file sliceRangeI.H.
|
inlinenoexcept |
A const_iterator set to the beginning of the range.
Definition at line 324 of file sliceRangeI.H.
|
inlinenoexcept |
A const_iterator set to 1 beyond the end of the range.
Definition at line 338 of file sliceRangeI.H.
|
inlinenoexcept |
A const_iterator set to 1 beyond the end of the range.
Definition at line 331 of file sliceRangeI.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the end of range.
Definition at line 345 of file sliceRangeI.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the end of range.
Definition at line 352 of file sliceRangeI.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the begin of range.
Definition at line 359 of file sliceRangeI.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the begin of range.
Definition at line 366 of file sliceRangeI.H.