Ignore:
Timestamp:
Feb 14, 2008, 3:26:19 PM (13 years ago)
Author:
Peter
Message:

Closes #247. Removed IteratorWeighted? iterators over weighted container instead can use Iterator with a special Policy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/StrideIterator.h

    r1066 r1088  
    4444  struct weighted_iterator_traits<StrideIterator<Iter> > {
    4545    typedef typename weighted_iterator_traits<Iter>::type type;
     46  };
     47
     48  template <class Iter>
     49  struct iterator_traits<StrideIterator<Iter> > {
     50    /**
     51       \return data that is *iter
     52    */
     53    double data(StrideIterator<Iter> iter) const
     54    { iterator_traits<Iter> jojo;
     55      return jojo.data(iter.base()); }
     56
     57    /**
     58       \return 1.0
     59    */
     60    double weight(StrideIterator<Iter> iter) const
     61    { return iterator_traits<Iter>().weight(iter.base()); }
     62
    4663  };
    4764
Note: See TracChangeset for help on using the changeset viewer.