1 #ifndef _theplu_yat_utility_data_weight_proxy_
2 #define _theplu_yat_utility_data_weight_proxy_
26 #include "DataWeight.h"
28 #include <boost/concept/assert.hpp>
51 template<
typename DataIterator,
typename WeightIterator>
62 : data_(data), weight_(weight)
64 using boost::Convertible;
66 BOOST_CONCEPT_ASSERT((Convertible<data_type, double>));
69 BOOST_CONCEPT_ASSERT((Convertible<weight_type, double>));
82 typename std::iterator_traits<DataIterator>::reference
data(
void)
90 const double&
data(
void)
const {
return *data_ ; }
102 typename std::iterator_traits<WeightIterator>::reference
weight(
void)
110 const double&
weight(
void)
const {
return *weight_; }
147 typedef std::iterator_traits<DataIterator> data_traits;
148 typedef typename data_traits::value_type data_type;
149 typedef typename data_traits::reference data_reference;
151 typedef std::iterator_traits<WeightIterator> weight_traits;
152 typedef typename weight_traits::value_type weight_type;
153 typedef typename weight_traits::reference weight_reference;
Holds a pair of data and associated weight.
Definition: DataWeight.h:39
Proxy class for DataWeight.
Definition: DataWeightProxy.h:52
DataIterator.
Definition: DataIterator.h:61
DataWeightProxy & operator=(const DataWeight &rhs)
assignment operator
Definition: DataWeightProxy.h:130
DataWeightProxy & operator=(const DataWeightProxy &rhs)
assignment operator
Definition: DataWeightProxy.h:120
const double & data(void) const
Definition: DataWeightProxy.h:90
WeightIterator.
Definition: WeightIterator.h:61
std::iterator_traits< WeightIterator >::reference weight(void)
Definition: DataWeightProxy.h:102
DataWeightProxy(DataIterator data, WeightIterator weight)
Constructor.
Definition: DataWeightProxy.h:61
std::iterator_traits< DataIterator >::reference data(void)
Definition: DataWeightProxy.h:82
const double & weight(void) const
Definition: DataWeightProxy.h:110