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>));
68 BOOST_CONCEPT_ASSERT((Convertible<data_reference, const double&>));
71 BOOST_CONCEPT_ASSERT((Convertible<weight_type, double>));
72 BOOST_CONCEPT_ASSERT((Convertible<weight_reference, const double&>));
85 typename std::iterator_traits<DataIterator>::reference
data(
void)
87 BOOST_CONCEPT_ASSERT((boost::Convertible<data_reference, double>));
94 const double&
data(
void)
const {
return *data_ ; }
106 typename std::iterator_traits<WeightIterator>::reference
weight(
void)
108 BOOST_CONCEPT_ASSERT((boost::Convertible<weight_reference, double>));
115 const double&
weight(
void)
const {
return *weight_; }
152 typedef std::iterator_traits<DataIterator> data_traits;
153 typedef typename data_traits::value_type data_type;
154 typedef typename data_traits::reference data_reference;
156 typedef std::iterator_traits<WeightIterator> weight_traits;
157 typedef typename weight_traits::value_type weight_type;
158 typedef typename weight_traits::reference weight_reference;