Iterator class for tensor index ranges.
More...
#include <tensor_index_tp.hpp>
|
| | Iterator (const TensorIndexTP< dim > &index, const TensorIndexTP< dim > &lower_bound, const TensorIndexTP< dim > &upper_bound) |
| | Constructs a new iterator object given and index and its lower and upper bounds.
|
| const TensorIndexTP< dim > & | operator* () const |
| | Dereference operator.
|
| const TensorIndexTP< dim > * | operator-> () const |
| | Indirection operator.
|
| std::int64_t | flat () const |
| | Transforms the current tensor index into a flat one by considering the upper bound as associated size.
|
| Iterator & | operator++ () |
| | Pre increments the iterator.
|
| Iterator | operator++ (int) |
| | Post increments the iterator.
|
| bool | operator== (const Iterator &rhs) const |
| | Compares if two iterators are equal. They are considered to be equal if their indices and bounds are equal for all the components.
|
| bool | operator!= (const Iterator &rhs) const |
| | Compares if two iterators are different. They are considered to be different if at least one of the components of their indices or bounds are different.
|
template<int dim>
class qugar::TensorIndexRangeTP< dim >::Iterator
Iterator class for tensor index ranges.
◆ Iterator()
Constructs a new iterator object given and index and its lower and upper bounds.
- Parameters
-
| index | Current index for the iterator. |
| lower_bound | Lower bounds. |
| upper_bound | Upper bounds. |
◆ flat()
Transforms the current tensor index into a flat one by considering the upper bound as associated size.
- Returns
- Computed flat index.
◆ operator!=()
Compares if two iterators are different. They are considered to be different if at least one of the components of their indices or bounds are different.
- Parameters
-
| rhs | Iterator to compare to the current one. |
- Returns
- Whether both iterators are different.
◆ operator*()
Dereference operator.
- Returns
- Reference to the index pointed by the iterator.
◆ operator++() [1/2]
Pre increments the iterator.
- Returns
- Updated iterator.
◆ operator++() [2/2]
Post increments the iterator.
- Returns
- Updated iterator.
◆ operator->()
Indirection operator.
- Returns
- Pointer to the index pointed by the iterator.
◆ operator==()
Compares if two iterators are equal. They are considered to be equal if their indices and bounds are equal for all the components.
- Parameters
-
| rhs | Iterator to compare to the current one. |
- Returns
- Whether both iterators are equal.
◆ index_
◆ lower_bound_
◆ upper_bound_
The documentation for this class was generated from the following file: