Skip to content

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

std::vector<double>::const_iterator Argos::Average01Iterator::it1;

Iterator over the first (mesh1) distance vector.


variable it2

std::vector<double>::const_iterator Argos::Average01Iterator::it2;

Iterator over the second (mesh2) distance vector.


variable max

double Argos::Average01Iterator::max;

Normalisation factor (largest average distance).


Public Functions Documentation

function operator!=

Inequality comparison based on the first inner iterator.

inline bool Argos::Average01Iterator::operator!= (
    const  Average01Iterator & other
) const

Parameters:

  • other Iterator to compare against.

Returns:

true if the two iterators are at different positions.


function operator*

Dereference and compute the element-wise normalised average.

inline double Argos::Average01Iterator::operator* () const

Returns:

(*it1 + *it2) / max.


function operator++

Advance both inner iterators by one position.

inline Average01Iterator & Argos::Average01Iterator::operator++ () 

Returns:

Reference to this iterator.



The documentation for this class was generated from the following file include/structure/ToFaceResult.h