#include <yat/utility/WeightedIterator.h>
Public Types | |
typedef DataIterator | data_iterator |
DataIterator. | |
typedef WeightIterator | weight_iterator |
DataIterator. | |
Public Member Functions | |
WeightedIterator (void) | |
Default Constructor. | |
WeightedIterator (DataIterator d, WeightIterator w) | |
Constructor. | |
const DataIterator & | data_base (void) const |
const WeightIterator & | weight_base (void) const |
DataWeightProxy< DataIterator, WeightIterator > | operator[] (int n) const |
element operator | |
template<typename D2, typename W2> | |
WeightedIterator (WeightedIterator< D2, W2 > other, typename boost::enable_if_convertible< D2, DataIterator >::type *=0, typename boost::enable_if_convertible< W2, WeightIterator >::type *=0) | |
Conversion constructor. | |
Friends | |
class | boost::iterator_core_access |
Related Functions | |
(Note that these are not member functions.) | |
template<typename DataIterator, typename WeightIterator> | |
WeightedIterator< DataIterator, WeightIterator > | weighted_iterator (DataIterator data, WeightIterator weight) |
convenient function to create WeightedIterator |
Adaptor enabling to make two unweighted iterators to behave like a weighted iterator. The data part corresponds to the DataIterator and the weight corresponds to the WeightIterator.
theplu::yat::utility::WeightedIterator< DataIterator, WeightIterator >::WeightedIterator | ( | void | ) | [inline] |
theplu::yat::utility::WeightedIterator< DataIterator, WeightIterator >::WeightedIterator | ( | WeightedIterator< D2, W2 > | other, | |
typename boost::enable_if_convertible< D2, DataIterator >::type * | = 0 , |
|||
typename boost::enable_if_convertible< W2, WeightIterator >::type * | = 0 | |||
) | [inline] |
Conversion constructor.
Create a WeightIterator<Base> from a WeightIterator<B2>. Possible if B2 is convertible to a Base. Constructor allows implicit conversions such as iterator to const_iterator.
const DataIterator& theplu::yat::utility::WeightedIterator< DataIterator, WeightIterator >::data_base | ( | void | ) | const [inline] |
const WeightIterator& theplu::yat::utility::WeightedIterator< DataIterator, WeightIterator >::weight_base | ( | void | ) | const [inline] |
WeightedIterator< DataIterator, WeightIterator > weighted_iterator | ( | DataIterator | data, | |
WeightIterator | weight | |||
) | [related] |
convenient function to create WeightedIterator
Convenient function in same fashion as std::make_pair.