#include <yat/utility/DataWeightProxy.h>
Public Member Functions | |
DataWeightProxy (DataIterator data, WeightIterator weight) | |
Constructor. | |
std::iterator_traits < DataIterator >::reference | data (void) |
const double & | data (void) const |
std::iterator_traits < WeightIterator >::reference | weight (void) |
const double & | weight (void) const |
DataWeightProxy & | operator= (const DataWeightProxy &rhs) |
assignment operator | |
DataWeightProxy & | operator= (const DataWeight &rhs) |
assignment operator | |
operator DataWeight () const | |
Conversion to DataWeight. |
For internal use only.
Class is used in WeightedIterator
Type Requirements:
const
double
.const
double&
.reference
must be exactly double&
. See data(void) and weight(void). theplu::yat::utility::DataWeightProxy< DataIterator, WeightIterator >::DataWeightProxy | ( | DataIterator | data, | |
WeightIterator | weight | |||
) | [inline] |
Constructor.
data | iterator pointing to data to hold | |
weight | iterator pointing to weight to hold |
const double& theplu::yat::utility::DataWeightProxy< DataIterator, WeightIterator >::data | ( | void | ) | const [inline] |
std::iterator_traits<DataIterator>::reference theplu::yat::utility::DataWeightProxy< DataIterator, WeightIterator >::data | ( | void | ) | [inline] |
double
. This function is typically used as left-hand side in an assignment and thus expected to being able to change the underlying data such as a double& can change the underlying double. But it is not required that return type is a double& as a Proxy class can do the job too.
DataWeightProxy& theplu::yat::utility::DataWeightProxy< DataIterator, WeightIterator >::operator= | ( | const DataWeightProxy< DataIterator, WeightIterator > & | rhs | ) | [inline] |
assignment operator
This function uses non-const function data(void) and weight(void) and consequently requires that reference type of both data_iterator and weight_iterator are convertible to double
.
const double& theplu::yat::utility::DataWeightProxy< DataIterator, WeightIterator >::weight | ( | void | ) | const [inline] |
std::iterator_traits<WeightIterator>::reference theplu::yat::utility::DataWeightProxy< DataIterator, WeightIterator >::weight | ( | void | ) | [inline] |
double
. This function is typically used as left-hand side in an assignment and thus expected to being able to change the underlying data such as a double& can change the underlying double. But it is not required that return type is a double& as a Proxy class can do the job too.