#include <yat/utility/iterator_traits.h>
Public Types | |
typedef traits::data_reference | data_reference |
typedef traits::weight_reference | weight_reference |
Public Member Functions | |
data_reference | data (Iter iter) const |
weight_reference | weight (Iter iter) const |
For weighted iterators this class requires that *Iter has functions data(void) and weight(void).
typedef traits::data_reference theplu::yat::utility::iterator_traits< Iter >::data_reference |
For unweighted iterator, data_reference is the same as std::iterator_traits<Iter>::reference, i.e., the data if the iterator is the same as *Iter.
For weighted iterators, data_reference is double& if *Iter has a function double& data(void). Otherwise data_reference is const double.
typedef traits::weight_reference theplu::yat::utility::iterator_traits< Iter >::weight_reference |
For unweighted iterator, data_reference const double since the weight is always implicitly 1.0 and not mutable.
For weighted iterators, data_reference is double& if *Iter has a function double& data(void). Otherwise data_reference is const double.
data_reference theplu::yat::utility::iterator_traits< Iter >::data | ( | Iter | iter | ) | const [inline] |
weight_reference theplu::yat::utility::iterator_traits< Iter >::weight | ( | Iter | iter | ) | const [inline] |