Changeset 909
- Timestamp:
- Sep 29, 2007, 1:49:05 AM (15 years ago)
- Location:
- trunk/yat
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/classifier/NCC.h
r898 r909 99 99 private: 100 100 utility::matrix centroids_; 101 const statistics::vector_distance_lookup_weighted_ptr distance_; 101 const statistics::vector_distance_lookup_weighted_ptr distance_; 102 102 103 103 // data_ has to be of type DataLookup2D to accomodate both -
trunk/yat/statistics/euclidean_vector_distance.h
r900 r909 7 7 #include "AveragerPairWeighted.h" 8 8 #include "vector_distance.h" 9 #include "yat/utility/IteratorTraits.h" 9 10 10 11 #include <cmath> … … 34 35 double vector_distance(Iter1 beg1,Iter1 end1, Iter2 beg2, 35 36 const euclidean_vector_distance_tag& disttype, 36 std::forward_iterator_tag)37 utility::unweighted_type) 37 38 { 38 39 AveragerPair ap; … … 50 51 double vector_distance(Iter1 beg1, Iter1 end1, Iter2 beg2, 51 52 const euclidean_vector_distance_tag& disttype, 52 utility::weighted_ random_access_iterator_tag)53 utility::weighted_type) 53 54 { 54 55 AveragerPairWeighted ap; -
trunk/yat/statistics/pearson_vector_distance.h
r900 r909 8 8 #include "AveragerPair.h" 9 9 #include "AveragerPairWeighted.h" 10 #include "yat/utility/IteratorTraits.h" 10 11 11 12 namespace theplu { … … 33 34 double vector_distance(Iter beg1,Iter end1, Iter beg2, 34 35 const pearson_vector_distance_tag& disttype, 35 std::forward_iterator_tag)36 utility::unweighted_type) 36 37 { 37 38 AveragerPair ap; … … 48 49 double vector_distance(Iter beg1,Iter end1, Iter beg2, 49 50 const pearson_vector_distance_tag& disttype, 50 utility::weighted_ random_access_iterator_tag)51 utility::weighted_type) 51 52 { 52 53 AveragerPairWeighted ap; -
trunk/yat/statistics/vector_distance.h
r898 r909 8 8 #include "yat/classifier/DataLookup1D.h" 9 9 #include "yat/classifier/DataLookupWeighted1D.h" 10 #include "yat/utility/IteratorTraits.h" 10 11 11 12 namespace theplu { … … 51 52 double vector_distance(Iter1 beg1, Iter1 end1, Iter2 beg2, const Dist disttag) 52 53 { 53 return vector_distance(beg1,end1,beg2, 54 typename vector_distance_traits<Dist>::distance(), 55 typename std::iterator_traits<Iter1>::iterator_category()); 54 return 55 vector_distance(beg1,end1,beg2, 56 typename vector_distance_traits<Dist>::distance(), 57 typename utility::weighted_iterator_traits<Iter1>::type()); 56 58 } 57 59 -
trunk/yat/utility/IteratorTraits.h
r908 r909 58 58 struct weighted_iterator_traits<yat::utility::IteratorWeighted<U,V> > { 59 59 typedef weighted_type type; 60 } 61 }; 62 63 60 }; 64 61 65 62 }}} // of namespace utility, yat, and theplu -
trunk/yat/utility/IteratorWeighted.h
r898 r909 7 7 #include <stddef.h> 8 8 9 // namespace std {10 // struct weighted_random_access_iterator_tag11 // : public random_access_iterator_tag {12 // };13 // }14 15 16 9 namespace theplu { 17 10 namespace yat { 18 11 namespace utility { 19 20 struct weighted_random_access_iterator_tag21 : public std::random_access_iterator_tag {22 };23 12 24 13 /** … … 29 18 { 30 19 public: 31 typedef weighted_random_access_iterator_tag iterator_category;20 typedef std::random_access_iterator_tag iterator_category; 32 21 typedef double value_type; 33 22 typedef size_t difference_type;
Note: See TracChangeset
for help on using the changeset viewer.