Struct Argos::AverageIterator
ClassList > Argos > AverageIterator
Bidirectional iterator that yields the average of two parallel distance vectors on the fly. More...
#include <ToFaceResult.h>
Public Attributes
| Type | Name |
|---|---|
| std::vector< double >::const_iterator | it1 |
| std::vector< double >::const_iterator | it2 |
Public Functions
| Type | Name |
|---|---|
| bool | operator!= (const AverageIterator & other) const Inequality comparison based on the first inner iterator. |
| double | operator* () const Dereference and compute the element-wise average. |
| AverageIterator & | operator++ () Advance both inner iterators by one position. |
Detailed Description
Dereferencing computes (*it1 + *it2) / 2.0 without allocating a new vector.
Public Attributes Documentation
variable it1
Iterator over the first (mesh1) distance vector.
variable it2
Iterator over the second (mesh2) distance vector.
Public Functions Documentation
function operator!=
Inequality comparison based on the first inner iterator.
Parameters:
otherIterator to compare against.
Returns:
true if the two iterators are at different positions.
function operator*
Dereference and compute the element-wise average.
Returns:
(*it1 + *it2) / 2.0.
function operator++
Advance both inner iterators by one position.
Returns:
Reference to this iterator.
The documentation for this class was generated from the following file include/structure/ToFaceResult.h