Changeset 1532 for trunk/yat/utility/WeightedIterator.h
- Timestamp:
- Sep 25, 2008, 12:06:47 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/utility/WeightedIterator.h
r1531 r1532 24 24 25 25 #include <boost/iterator/iterator_facade.hpp> 26 27 #include <iterator> 26 28 27 29 namespace theplu { … … 71 73 WeightIterator w_iter_; 72 74 75 void advance(size_t n) 76 { std::advance(d_iter_, n); std::advance(w_iter_, n); } 77 78 void decrement(void) { --d_iter_; --w_iter_; } 79 80 typename std::iterator_traits<DataIterator>::difference_type 81 distance_to(const WeightedIterator& other) const 82 { return std::distance(d_iter_, other.d_iter_); } 83 73 84 DataWeight dereference(void) const 74 85 { return DataWeight(*d_iter_, *w_iter_); } 86 87 bool equal(const WeightedIterator& other) const 88 { return d_iter_==other.d_iter_ && w_iter_==other.w_iter_; } 75 89 76 90 void increment(void) { ++d_iter_; ++w_iter_; }
Note: See TracChangeset
for help on using the changeset viewer.