Struct Argos::Average01Iterator
ClassList > Argos > Average01Iterator
Bidirectional iterator that yields normalised averages, mapping the result to [0, 1].More...
#include <ToFaceResult.h>
Public Attributes
| Type | Name |
|---|---|
| std::vector< double >::const_iterator | it1 |
| std::vector< double >::const_iterator | it2 |
| double | max |
Public Functions
| Type | Name |
|---|---|
| bool | operator!= (const Average01Iterator & other) const Inequality comparison based on the first inner iterator. |
| double | operator* () const Dereference and compute the element-wise normalised average. |
| Average01Iterator & | operator++ () Advance both inner iterators by one position. |
Detailed Description
Dereferencing computes (*it1 + *it2) / max where max is the largest average distance in the full result set.
Public Attributes Documentation
variable it1
Iterator over the first (mesh1) distance vector.
variable it2
Iterator over the second (mesh2) distance vector.
variable max
Normalisation factor (largest average distance).
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 normalised average.
Returns:
(*it1 + *it2) / max.
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