Proxy class for DataWeight.
More...
#include <yat/utility/DataWeightProxy.h>
template<typename DataIterator, typename WeightIterator>
class theplu::yat::utility::DataWeightProxy< DataIterator, WeightIterator >
Proxy class for DataWeight.
Class is used in WeightedIterator
Type Requirements (for both DataIterator and WeightIterator):
- underlying iterators are Readable Iterator
- value_type must be convertible to
const
double
.
- reference must be convertible to
const
double&
.
- If the DataWeightProxy is going to be used in a non-const way iterators must be mutable and
reference
must be exactly double&
. See data(void) and weight(void).
template<typename DataIterator, typename WeightIterator>
Constructor.
- Parameters
-
data | iterator pointing to data to hold |
weight | iterator pointing to weight to hold |
template<typename DataIterator, typename WeightIterator>
- Returns
- reference to data
This function requires that reference type of data_iterator is convertible to 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.
template<typename DataIterator, typename WeightIterator>
- Returns
- const reference to data
template<typename DataIterator, typename WeightIterator>
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
.
template<typename DataIterator, typename WeightIterator>
- Returns
- reference to weight
This function requires that reference type of weight_iterator is convertible to 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.
template<typename DataIterator, typename WeightIterator>
- Returns
- const reference to weight
The documentation for this class was generated from the following file: