A tuple of integers comprising start, size, total. More...

Public Types | |
| typedef IntType | value_type |
| Type of values contained. More... | |
| typedef IntType | size_type |
| The type that can represent the size. More... | |
| using | const_iterator = IndexIterator< IntType > |
| Input iterator with const access. More... | |
| using | const_reverse_iterator = ReverseIndexIterator< IntType > |
| Reverse input iterator with const access. More... | |
Public Member Functions | |
| OffsetRange (const OffsetRange &) noexcept=default | |
| Copy construct. More... | |
| OffsetRange (OffsetRange &&) noexcept=default | |
| Move construct. More... | |
| OffsetRange & | operator= (const OffsetRange &) noexcept=default |
| Copy assignment. More... | |
| OffsetRange & | operator= (OffsetRange &&) noexcept=default |
| Move assignment. More... | |
| constexpr | OffsetRange () noexcept |
| Default construct as (0,0,0) More... | |
| constexpr | OffsetRange (IntType len) noexcept |
| Construct with start=0 and specified size, assigns total=size. More... | |
| constexpr | OffsetRange (IntType beg, IntType len, IntType tot) noexcept |
| Construct from all components, no checks. More... | |
| constexpr bool | empty () const noexcept |
| True if zero-sized. More... | |
| constexpr IntType | size () const noexcept |
| The size. More... | |
| constexpr IntType & | size () noexcept |
| Non-const access to the size. More... | |
| constexpr IntType | start () const noexcept |
| The lower value of the range. More... | |
| constexpr IntType & | start () noexcept |
| Non-const access to start of the range. More... | |
| constexpr IntType | total () const noexcept |
| The total size. More... | |
| constexpr IntType & | total () noexcept |
| Non-const access to the total size. More... | |
| IntRange< IntType > | range () const noexcept |
| The (start,size) range. More... | |
| void | clear () noexcept |
| Reset to zero. More... | |
| void | reset (IntType len) noexcept |
| Reset to the specified size, with start=0 and total=size. More... | |
| void | reset (IntType beg, IntType len, IntType tot) noexcept |
| Reset all components. More... | |
| template<class T2 > | |
| constexpr bool | equals (const OffsetRange< T2 > &) const noexcept |
| Test equality of start/size/total. More... | |
| template<class T2 > | |
| constexpr int | compare (const OffsetRange< T2 > &) const noexcept |
| Compare start/size/total in that order. More... | |
| template<class T2 > | |
| constexpr bool | operator== (const OffsetRange< T2 > &other) const noexcept |
| Test for equality of begin/size/total values. More... | |
| template<class T2 > | |
| constexpr bool | operator< (const OffsetRange< T2 > &other) const noexcept |
| Comparison function for sorting, compares the start. More... | |
| template<class T2 > | |
| constexpr bool | operator!= (const OffsetRange< T2 > &other) const noexcept |
| template<class T2 > | |
| constexpr bool | operator<= (const OffsetRange< T2 > &other) const noexcept |
| template<class T2 > | |
| constexpr bool | operator> (const OffsetRange< T2 > &other) const noexcept |
| template<class T2 > | |
| constexpr bool | operator>= (const OffsetRange< T2 > &other) const noexcept |
| void | operator= (IntType len) noexcept |
| Assign to the specified size, with start=0 and total=size. More... | |
| template<class IntT2 > | |
| void | operator= (const OffsetRange< IntT2 > &rhs) noexcept |
| Assign from an OffsetRange with the same or lower representation. More... | |
| const_iterator | at (IntType i) const |
| Return const_iterator to a position within the range, with bounds checking. More... | |
| constexpr IntType | operator[] (IntType i) const noexcept |
| Offset dereference, without bounds checking. More... | |
| constexpr bool | operator() (IntType i) const noexcept |
| True if the value is between the start and size range. More... | |
| constexpr bool | contains (IntType value) const noexcept |
| True if the value is between the start and size range range. More... | |
| constexpr IntType | begin_value () const noexcept |
| The value at the beginning of the start/size range - same as start() More... | |
| constexpr IntType | end_value () const noexcept |
| The value 1 beyond the end of the start/size range. More... | |
| constexpr IntType | rbegin_value () const noexcept |
| The max value of the start/size range. More... | |
| constexpr IntType | rend_value () const noexcept |
| The value 1 before the begin of start/size range. 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... | |
| template<class IntT2 > | |
| constexpr bool | equals (const OffsetRange< IntT2 > &b) const noexcept |
| template<class IntT2 > | |
| constexpr int | compare (const OffsetRange< IntT2 > &b) const noexcept |
A tuple of integers comprising start, size, total.
This frequently corresponds what is termed a "hyperslab", a "slice" or a "selection" for MPI addressing. For this type of use, the OffsetRange would represent the local rank addressing. Apart from the total size, it would not have information about any other ranks (like Foam::globalIndex does).
Definition at line 59 of file OffsetRange.H.
| typedef IntType value_type |
Type of values contained.
Definition at line 119 of file OffsetRange.H.
| typedef IntType size_type |
The type that can represent the size.
Definition at line 124 of file OffsetRange.H.
| using const_iterator = IndexIterator<IntType> |
Input iterator with const access.
Definition at line 129 of file OffsetRange.H.
| using const_reverse_iterator = ReverseIndexIterator<IntType> |
Reverse input iterator with const access.
Definition at line 134 of file OffsetRange.H.
|
defaultnoexcept |
Copy construct.
|
defaultnoexcept |
Move construct.
|
inlinenoexcept |
Default construct as (0,0,0)
Definition at line 24 of file OffsetRangeI.H.
|
inlinenoexcept |
Construct with start=0 and specified size, assigns total=size.
Definition at line 33 of file OffsetRangeI.H.
|
inlinenoexcept |
Construct from all components, no checks.
Definition at line 43 of file OffsetRangeI.H.
|
defaultnoexcept |
Copy assignment.
|
defaultnoexcept |
Move assignment.
|
inlinenoexcept |
True if zero-sized.
Definition at line 193 of file OffsetRange.H.
|
inlinenoexcept |
The size.
Definition at line 198 of file OffsetRange.H.
Referenced by GlobalOffset< IntType >::localSize().

|
inlinenoexcept |
Non-const access to the size.
Definition at line 203 of file OffsetRange.H.
|
inlinenoexcept |
The lower value of the range.
Definition at line 208 of file OffsetRange.H.
Referenced by GlobalOffset< IntType >::localStart(), and GlobalOffset< IntType >::toGlobal().

|
inlinenoexcept |
Non-const access to start of the range.
Definition at line 213 of file OffsetRange.H.
|
inlinenoexcept |
The total size.
Definition at line 218 of file OffsetRange.H.
Referenced by polyWriter::nTotalCells(), internalMeshWriter::nTotalCells(), patchMeshWriter::nTotalCells(), polyWriter::nTotalPoints(), internalMeshWriter::nTotalPoints(), patchMeshWriter::nTotalPoints(), and GlobalOffset< IntType >::totalSize().

|
inlinenoexcept |
Non-const access to the total size.
Definition at line 223 of file OffsetRange.H.
|
inlinenoexcept |
The (start,size) range.
Definition at line 228 of file OffsetRange.H.
|
inlinenoexcept |
Reset to zero.
Definition at line 97 of file OffsetRangeI.H.
|
inlinenoexcept |
Reset to the specified size, with start=0 and total=size.
Can also use operator= assignment
Definition at line 106 of file OffsetRangeI.H.
Referenced by OffsetRange< label >::operator=().

|
inlinenoexcept |
Reset all components.
Definition at line 116 of file OffsetRangeI.H.
|
inlinenoexcept |
Test equality of start/size/total.
Referenced by OffsetRange< label >::operator==().

|
inlinenoexcept |
Compare start/size/total in that order.
Referenced by OffsetRange< label >::operator<().

|
inlinenoexcept |
Test for equality of begin/size/total values.
Definition at line 274 of file OffsetRange.H.
|
inlinenoexcept |
Comparison function for sorting, compares the start.
If the start values are equal, also compares the size, etc
Definition at line 285 of file OffsetRange.H.
|
inlinenoexcept |
Definition at line 292 of file OffsetRange.H.
|
inlinenoexcept |
Definition at line 298 of file OffsetRange.H.
|
inlinenoexcept |
Definition at line 304 of file OffsetRange.H.
|
inlinenoexcept |
Definition at line 310 of file OffsetRange.H.
|
inlinenoexcept |
Assign to the specified size, with start=0 and total=size.
Definition at line 321 of file OffsetRange.H.
|
inlinenoexcept |
Assign from an OffsetRange with the same or lower representation.
Definition at line 335 of file OffsetRange.H.
|
inline |
Return const_iterator to a position within the range, with bounds checking.
Definition at line 348 of file OffsetRange.H.
|
inlinenoexcept |
Offset dereference, without bounds checking.
Definition at line 177 of file OffsetRangeI.H.
|
inlinenoexcept |
True if the value is between the start and size range.
Behaviour identical to contains() - usable as a predicate
Definition at line 360 of file OffsetRange.H.
|
inlinenoexcept |
True if the value is between the start and size range range.
Definition at line 130 of file OffsetRangeI.H.
Referenced by GlobalOffset< IntType >::isLocal(), and OffsetRange< label >::operator()().

|
inlinenoexcept |
The value at the beginning of the start/size range - same as start()
Definition at line 66 of file OffsetRangeI.H.
Referenced by OffsetRange< label >::begin(), and OffsetRange< label >::cbegin().

|
inlinenoexcept |
The value 1 beyond the end of the start/size range.
Definition at line 74 of file OffsetRangeI.H.
Referenced by OffsetRange< label >::cend(), and OffsetRange< label >::end().

|
inlinenoexcept |
The max value of the start/size range.
Definition at line 82 of file OffsetRangeI.H.
Referenced by OffsetRange< label >::crbegin(), and OffsetRange< label >::rbegin().

|
inlinenoexcept |
The value 1 before the begin of start/size range.
Definition at line 90 of file OffsetRangeI.H.
Referenced by OffsetRange< label >::crend(), and OffsetRange< label >::rend().

|
inlinenoexcept |
A const_iterator set to the beginning of the range.
Definition at line 402 of file OffsetRange.H.
|
inlinenoexcept |
A const_iterator set to the beginning of the range.
Definition at line 407 of file OffsetRange.H.
|
inlinenoexcept |
A const_iterator set to 1 beyond the end of the range.
Definition at line 412 of file OffsetRange.H.
|
inlinenoexcept |
A const_iterator set to 1 beyond the end of the range.
Definition at line 417 of file OffsetRange.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the end of range.
Definition at line 426 of file OffsetRange.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the end of range.
Definition at line 432 of file OffsetRange.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the begin of range.
Definition at line 437 of file OffsetRange.H.
|
inlinenoexcept |
A const_reverse_iterator set to 1 before the begin of range.
Definition at line 442 of file OffsetRange.H.
|
inlinenoexcept |
Definition at line 140 of file OffsetRangeI.H.
|
inlinenoexcept |
Definition at line 156 of file OffsetRangeI.H.