theplu::yat::utility::WeightedIterator< DataIterator, WeightIterator > Class Template Reference

WeightedIterator. More...

#include <yat/utility/WeightedIterator.h>

List of all members.

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 DataIteratordata_base (void) const
const WeightIteratorweight_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


Detailed Description

template<typename DataIterator, typename WeightIterator>
class theplu::yat::utility::WeightedIterator< DataIterator, WeightIterator >

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.


Constructor & Destructor Documentation

template<typename DataIterator, typename WeightIterator>
theplu::yat::utility::WeightedIterator< DataIterator, WeightIterator >::WeightedIterator ( void   )  [inline]

Default Constructor.

Created iterator is not dereferencable

Since:
New in yat 0.6

template<typename DataIterator, typename WeightIterator>
template<typename D2, typename W2>
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.


Member Function Documentation

template<typename DataIterator, typename WeightIterator>
const DataIterator& theplu::yat::utility::WeightedIterator< DataIterator, WeightIterator >::data_base ( void   )  const [inline]

Returns:
const reference to underlying data iterator

template<typename DataIterator, typename WeightIterator>
const WeightIterator& theplu::yat::utility::WeightedIterator< DataIterator, WeightIterator >::weight_base ( void   )  const [inline]

Returns:
const reference to underlying weight iterator


Friends And Related Function Documentation

template<typename DataIterator, typename WeightIterator>
WeightedIterator< DataIterator, WeightIterator > weighted_iterator ( DataIterator  data,
WeightIterator  weight 
) [related]

convenient function to create WeightedIterator

Convenient function in same fashion as std::make_pair.


The documentation for this class was generated from the following file:

Generated on Tue Jan 18 02:21:19 2011 for yat by  doxygen 1.5.5