Changeset 1083
- Timestamp:
- Feb 13, 2008, 2:13:18 PM (16 years ago)
- Location:
- trunk/yat
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/classifier/DataLookup1D.h
r1080 r1083 51 51 /// 'Read Only' iterator 52 52 typedef utility::StrideIterator< 53 utility::Iterator<const DataLookup2D, utility::unweighted_type, const double, 54 void, const double> > 53 utility::Iterator<const DataLookup2D, const double, void, const double> > 55 54 const_iterator; 56 55 -
trunk/yat/classifier/KernelLookup.h
r1080 r1083 72 72 /// 'Read Only' iterator 73 73 typedef utility::StrideIterator< 74 utility::Iterator<const KernelLookup, utility::unweighted_type, const double, 75 void, const double> > 74 utility::Iterator<const KernelLookup, const double, void, const double> > 76 75 const_iterator; 77 76 -
trunk/yat/classifier/MatrixLookup.h
r1080 r1083 75 75 /// 'Read Only' iterator 76 76 typedef utility::StrideIterator< 77 utility::Iterator<const MatrixLookup, utility::unweighted_type, const double, 78 void, const double> > 77 utility::Iterator<const MatrixLookup, const double, void, const double> > 79 78 const_iterator; 80 79 -
trunk/yat/utility/Iterator.h
r1082 r1083 40 40 @brief Iterator 41 41 */ 42 template<typename Container, typename weighted_tag, typenamevalue,42 template<typename Container, typename value, 43 43 typename pointer = value*, typename reference = value&, 44 44 class Policy = IteratorPolicy<Container, reference, value> > … … 48 48 { 49 49 public: 50 typedef weighted_tagweighted_iterator_type;50 typedef typename Policy::weighted_iterator_type weighted_iterator_type; 51 51 52 52 private: 53 typedef Iterator<Container, weighted_tag, value, pointer, reference, 54 Policy> self; 53 typedef Iterator<Container, value, pointer, reference, Policy> self; 55 54 56 55 public: -
trunk/yat/utility/IteratorPolicy.h
r1082 r1083 25 25 */ 26 26 27 #include "iterator_traits.h" 28 27 29 namespace theplu { 28 30 namespace yat { … … 37 39 typedef reference data_type; 38 40 typedef weight_t weight_type; 41 typedef unweighted_type weighted_iterator_type; 39 42 40 43 data_type data(const Container& c, size_t row, size_t column) const … … 54 57 55 58 }; 59 60 61 /** 62 \brief policy for weighted Iterator 63 */ 64 template<class Container, typename data_t, typename weight_t> 65 struct IteratorPolicyWeighted 66 { 67 typedef std::pair<data_t, weight_t> reference; 68 typedef data_t data_type; 69 typedef weight_t weight_type; 70 typedef weighted_type weighted_iterator_type; 71 72 data_type data(const Container& c, size_t row, size_t column) const 73 { 74 return c.data(row, column); 75 } 76 77 reference dereference(const Container& c, size_t row, size_t column) const 78 { 79 return reference(this->data(c, row, column),this->weight(c, row, column)); 80 } 81 82 weight_type weight(const Container& c, size_t row, size_t column) const 83 { 84 return c.weight(row, column); 85 } 86 87 }; 56 88 }}} // of namespace utility, yat, and theplu 57 89
Note: See TracChangeset
for help on using the changeset viewer.