A set of labels defined by a start, a length and a stride. More...
Classes | |
class | const_iterator |
Forward 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 | |
sliceRange (const sliceRange &)=default | |
Default copy construct. More... | |
sliceRange (sliceRange &&)=default | |
Default move construct. More... | |
constexpr | sliceRange () noexcept |
An empty slice (0,0,0) More... | |
sliceRange (label start, label size, label stride) noexcept | |
sliceRange (const FixedList< label, 3 > &coeffs) | |
bool | empty () const noexcept |
Is the range empty? More... | |
bool | valid () const noexcept |
Is the range non-empty? More... | |
constexpr label | start () const noexcept |
The (inclusive) lower value of the range. More... | |
constexpr label | size () const noexcept |
The size of the range. More... | |
constexpr label | stride () const noexcept |
The stride for the range. More... | |
constexpr label | first () const noexcept |
The (inclusive) lower value of the range - same as start() More... | |
label | last () const noexcept |
The (inclusive) upper value of the range. More... | |
List< label > | labels () const |
Return the slice as a list of labels. More... | |
sliceRange & | operator= (const sliceRange &)=default |
Default copy assignment. More... | |
sliceRange & | operator= (sliceRange &&)=default |
Default move assignment. More... | |
label | operator[] (const label i) const noexcept |
Return element in the range, without bounds checking. More... | |
const_iterator | begin () const |
A const_iterator set to the beginning of the range. More... | |
const_iterator | cbegin () const |
A const_iterator set to the beginning of the range. More... | |
const const_iterator | cend () const |
A const_iterator set to 1 beyond the end of the range. More... | |
const const_iterator | end () const |
A const_iterator set to 1 beyond the end of the range. More... | |
indexer | generator () const |
Return a forward values generator. More... | |
const_iterator | at (const label i) const |
Protected Attributes | |
label | start_ |
The start point for the interval. More... | |
label | size_ |
The length of the interval. More... | |
label | stride_ |
The stride within the interval. More... | |
A set of labels defined by a start, a length and a stride.
Definition at line 56 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.
|
default |
Default copy construct.
|
default |
Default move construct.
|
inlineconstexprnoexcept |
An empty slice (0,0,0)
Definition at line 32 of file sliceRangeI.H.
|
inlinenoexcept |
Construct slice from start/size/stride, enforcing non-negative size and stride.
Definition at line 41 of file sliceRangeI.H.
|
explicit |
Construct slice from start/size/stride coefficients, enforcing non-negative size and stride.
Definition at line 36 of file sliceRange.C.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
The (inclusive) lower value of the range.
Definition at line 121 of file sliceRange.H.
References sliceRange::start_.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
The stride for the range.
Definition at line 133 of file sliceRange.H.
References sliceRange::stride_.
|
inlineconstexprnoexcept |
The (inclusive) lower value of the range - same as start()
Definition at line 139 of file sliceRange.H.
References sliceRange::start_.
|
inlinenoexcept |
The (inclusive) upper value of the range.
Definition at line 145 of file sliceRange.H.
References sliceRange::size_, sliceRange::start_, and sliceRange::stride_.
Foam::List< Foam::label > labels | ( | ) | const |
Return the slice as a list of labels.
Definition at line 46 of file sliceRange.C.
References stdFoam::cbegin(), and stdFoam::cend().
|
default |
Default copy assignment.
|
default |
Default move assignment.
|
inlinenoexcept |
Return element in the range, without bounds checking.
Definition at line 204 of file sliceRangeI.H.
|
inline |
A const_iterator set to the beginning of the range.
The value returned is guaranteed to be the same as start()
Definition at line 165 of file sliceRangeI.H.
|
inline |
A const_iterator set to the beginning of the range.
The value returned is guaranteed to be the same as start()
Definition at line 171 of file sliceRangeI.H.
|
inline |
A const_iterator set to 1 beyond the end of the range.
The value returned is the same as after()
Definition at line 183 of file sliceRangeI.H.
|
inline |
A const_iterator set to 1 beyond the end of the range.
The value returned is the same as after()
Definition at line 177 of file sliceRangeI.H.
|
inline |
Return a forward values generator.
Definition at line 189 of file sliceRangeI.H.
|
inline |
Return const_iterator to a position within the range, with bounds checking.
Definition at line 196 of file sliceRangeI.H.
|
protected |
The start point for the interval.
Definition at line 63 of file sliceRange.H.
Referenced by sliceRange::first(), sliceRange::last(), and sliceRange::start().
|
protected |
The length of the interval.
Definition at line 66 of file sliceRange.H.
Referenced by sliceRange::empty(), sliceRange::last(), sliceRange::size(), and sliceRange::valid().
|
protected |
The stride within the interval.
Definition at line 69 of file sliceRange.H.
Referenced by sliceRange::last(), and sliceRange::stride().