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> 29 #include <boost/iterator/iterator_concepts.hpp> 30 #include <boost/iterator/iterator_traits.hpp> 53 template<
typename DataIterator,
typename WeightIterator>
66 BOOST_CONCEPT_ASSERT((boost_concepts::ReadableIterator<DataIterator>));
67 BOOST_CONCEPT_ASSERT((boost_concepts::ReadableIterator<WeightIterator>));
69 using boost::Convertible;
71 BOOST_CONCEPT_ASSERT((Convertible<data_type, double>));
74 BOOST_CONCEPT_ASSERT((Convertible<weight_type, double>));
92 typename boost::iterator_reference<DataIterator>::type
data(
void)
100 const double&
data(
void)
const {
return *data_ ; }
112 typename boost::iterator_reference<WeightIterator>::type
weight(
void)
120 const double&
weight(
void)
const {
return *weight_; }
157 typedef typename boost::iterator_value<DataIterator>::type data_type;
158 typedef typename boost::iterator_reference<DataIterator>::type data_reference;
160 typedef typename boost::iterator_value<WeightIterator>::type weight_type;
162 typename boost::iterator_reference<WeightIterator>::type weight_reference;
boost::iterator_reference< DataIterator >::type data(void)
Definition: DataWeightProxy.h:92
The Department of Theoretical Physics namespace as we define it.
Holds a pair of data and associated weight.
Definition: DataWeight.h:39
Proxy class for DataWeight.
Definition: DataWeightProxy.h:54
DataIterator.
Definition: DataIterator.h:63
DataWeightProxy & operator=(const DataWeight &rhs)
assignment operator
Definition: DataWeightProxy.h:140
const double & weight(void) const
Definition: DataWeightProxy.h:120
const double & data(void) const
Definition: DataWeightProxy.h:100
DataWeightProxy & operator=(const DataWeightProxy &rhs)
assignment operator
Definition: DataWeightProxy.h:130
WeightIterator.
Definition: WeightIterator.h:64
boost::iterator_reference< WeightIterator >::type weight(void)
Definition: DataWeightProxy.h:112
DataWeightProxy(DataIterator data, WeightIterator weight)
Constructor.
Definition: DataWeightProxy.h:63