|
TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
|
#include <triqs/mesh/mesh_iterator.hpp>
A generic random access iterator for 1D meshes.
The iterator simply store a pointer to the underlying mesh and the data index of the current mesh point. It uses the mesh's operator[] to access the mesh points via the data index.
| M | Mesh type. |
Definition at line 44 of file mesh_iterator.hpp.
Public Types | |
| using | difference_type = std::ptrdiff_t |
| Difference type. | |
| using | iterator_category = std::random_access_iterator_tag |
| Iterator category. | |
| using | pointer = value_type * |
| Pointer type. | |
| using | reference = value_type const & |
| Reference type. | |
| using | value_type = typename M::mesh_point_t |
| Value type. | |
Public Member Functions | |
| value_type | operator* () const noexcept |
| Dereference operator. | |
| mesh_iterator | operator+ (difference_type n) const noexcept |
| Addition operator for an iterator and an integer. | |
| mesh_iterator & | operator++ () noexcept |
| Pre-increment operator increments the current data index by \( 1 \). | |
| mesh_iterator | operator++ (int) noexcept |
| Post-increment operator increments the current data index by \( 1 \). | |
| mesh_iterator & | operator+= (difference_type n) noexcept |
| Addition assignment operator. | |
| mesh_iterator | operator- (difference_type n) const noexcept |
| Subtraction operator for an iterator and an integer. | |
| difference_type | operator- (mesh_iterator const &rhs) const noexcept |
| Get the distance between two iterators. | |
| mesh_iterator & | operator-- () noexcept |
| Pre-decrement operator decrements the current data index by \( 1 \). | |
| mesh_iterator | operator-- (int) noexcept |
| Post-decrement operator decrements the current data index by \( 1 \). | |
| mesh_iterator & | operator-= (difference_type n) noexcept |
| Subtraction assignment operator. | |
| value_type | operator-> () const noexcept |
| Member access operator. | |
| std::strong_ordering | operator<=> (mesh_iterator const &rhs) const noexcept |
| Three-way comparison operator for two iterators. | |
| bool | operator== (mesh_iterator const &other) const noexcept |
| Equal-to operator for two iterators. | |
| value_type | operator[] (difference_type n) const noexcept |
| Subscript operator. | |
Public Attributes | |
| long | data_index {-1} |
| Current data index. | |
| M const * | mesh_ptr {nullptr} |
| Pointer to the underlying mesh. | |
Friends | |
| mesh_iterator | operator+ (difference_type n, mesh_iterator it) noexcept |
| Addition operator for an integer and an iterator. | |
|
inlinenodiscardnoexcept |
Dereference operator.
Definition at line 124 of file mesh_iterator.hpp.
|
inlinenodiscardnoexcept |
Addition operator for an iterator and an integer.
| n | Number of steps to add to the current data index. |
Definition at line 147 of file mesh_iterator.hpp.
|
inlinenoexcept |
Pre-increment operator increments the current data index by \( 1 \).
Definition at line 70 of file mesh_iterator.hpp.
|
inlinenoexcept |
Post-increment operator increments the current data index by \( 1 \).
Definition at line 79 of file mesh_iterator.hpp.
|
inlinenoexcept |
Addition assignment operator.
| n | Number of steps to add to the current data index. |
Definition at line 137 of file mesh_iterator.hpp.
|
inlinenodiscardnoexcept |
Subtraction operator for an iterator and an integer.
| n | Number of steps to subtract from the current data index. |
Definition at line 172 of file mesh_iterator.hpp.
|
inlinenodiscardnoexcept |
Get the distance between two iterators.
| rhs | Right-hand side iterator. |
Definition at line 179 of file mesh_iterator.hpp.
|
inlinenoexcept |
Pre-decrement operator decrements the current data index by \( 1 \).
Definition at line 89 of file mesh_iterator.hpp.
|
inlinenoexcept |
Post-decrement operator decrements the current data index by \( 1 \).
Definition at line 98 of file mesh_iterator.hpp.
|
inlinenoexcept |
Subtraction assignment operator.
| n | Number of steps to subtract from the current data index. |
Definition at line 162 of file mesh_iterator.hpp.
|
inlinenodiscardnoexcept |
Member access operator.
Definition at line 130 of file mesh_iterator.hpp.
|
inlinenodiscardnoexcept |
Three-way comparison operator for two iterators.
| rhs | Right hand side iterator to compare with. |
Definition at line 110 of file mesh_iterator.hpp.
|
inlinenodiscardnoexcept |
Equal-to operator for two iterators.
| other | Iterator to compare with. |
Definition at line 118 of file mesh_iterator.hpp.
|
inlinenodiscardnoexcept |
Subscript operator.
| n | Number of steps to add to the current value. |
Definition at line 186 of file mesh_iterator.hpp.
|
friend |
Addition operator for an integer and an iterator.
| n | Number of steps to add to the current data index of the iterator. |
| it | Iterator. |
Definition at line 155 of file mesh_iterator.hpp.