Custom pair iterator for iterating through all possible pairs of Particle objects.
More...
#include <ParticleContainer.h>
|
| ContainerType::iterator | outer_it |
| | A standard library iterator for iterating through the outer pairs.
|
| |
| ContainerType::iterator | inner_it |
| | A standard library iterator for iterating through the inner pairs.
|
| |
| ContainerType::iterator | container_begin |
| | A standard library iterator marking the beginning of the iteration.
|
| |
| ContainerType::iterator | container_end |
| | A standard library iterator marking the end of the iteration.
|
| |
Custom pair iterator for iterating through all possible pairs of Particle objects.
◆ PairIterator()
| ParticleContainer::PairIterator::PairIterator |
( |
ContainerType::iterator |
outer, |
|
|
ContainerType::iterator |
inner, |
|
|
ContainerType::iterator |
begin, |
|
|
ContainerType::iterator |
end |
|
) |
| |
Construct a new Pair Iterator.
- Parameters
-
| outer | A standard library iterator for iterating through the outer pairs. |
| inner | A standard library iterator for iterating through the inner pairs. |
| begin | A standard library iterator marking the beginning of the iteration. |
| end | A standard library iterator marking the end of the iteration. |
◆ operator!=()
| bool ParticleContainer::PairIterator::operator!= |
( |
const PairIterator & |
other | ) |
const |
Checks if two iterator instances do not point to the same Particle pair.
- Parameters
-
| other | The other pair iterator to compare iteration progress with. |
- Returns
- true if at least one iterator points to a different object.
-
false if both iterators point to the same object.
◆ operator*()
| std::pair< Particle &, Particle & > ParticleContainer::PairIterator::operator* |
( |
| ) |
const |
Override of the * operator, returning a pair of Particles.
- Returns
- A pair of Particle references.
◆ operator++()
| PairIterator & ParticleContainer::PairIterator::operator++ |
( |
| ) |
|
Override of the ++ operator.
Begins by incrementing the inner iterator. Once the inner iterator has reached the final Particle in the container, the outer iterator gets incremented and the inner iterator is reset to the beginning.
- Returns
- A PairIterator& used to continue iteration.
◆ operator==()
| bool ParticleContainer::PairIterator::operator== |
( |
const PairIterator & |
other | ) |
const |
Checks if two iterator instances point to the same Particle pair.
- Parameters
-
| other | The other pair iterator to compare iteration progress with. |
- Returns
- true if both iterators point to the same object.
-
false if at least one iterator points to a different object.
◆ container_begin
| ContainerType::iterator ParticleContainer::PairIterator::container_begin |
|
private |
A standard library iterator marking the beginning of the iteration.
◆ container_end
| ContainerType::iterator ParticleContainer::PairIterator::container_end |
|
private |
A standard library iterator marking the end of the iteration.
◆ inner_it
| ContainerType::iterator ParticleContainer::PairIterator::inner_it |
|
private |
A standard library iterator for iterating through the inner pairs.
◆ outer_it
| ContainerType::iterator ParticleContainer::PairIterator::outer_it |
|
private |
A standard library iterator for iterating through the outer pairs.
The documentation for this class was generated from the following file: