Changeset 1306 for trunk/yat/statistics/PearsonDistance.h
 Timestamp:
 May 15, 2008, 12:44:30 AM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/yat/statistics/PearsonDistance.h
r1275 r1306 26 26 */ 27 27 28 #include "AveragerPair.h" 29 #include "AveragerPairWeighted.h" 28 #include "averager_traits.h" 30 29 #include "yat/utility/iterator_traits.h" 31 30 … … 63 62 (Iter1 beg1,Iter1 end1, Iter2 beg2) const 64 63 { 65 return this>distance(beg1, end1, beg2, 66 typename utility::weighted_if_any2<Iter1,Iter2>::type()); 67 } 68 69 private: 70 template <typename Iter1, typename Iter2> 71 double distance (Iter1 beg1,Iter1 end1, Iter2 beg2, 72 utility::unweighted_iterator_tag) const 73 { 74 AveragerPairWeighted ap; 64 typename averager_pair<Iter1, Iter2>::type ap; 75 65 add(ap,beg1,end1,beg2); 76 66 return 1ap.correlation(); 77 67 } 78 79 template <typename Iter1, typename Iter2>80 double distance (Iter1 beg1,Iter1 end1, Iter2 beg2,81 utility::weighted_iterator_tag) const82 {83 AveragerPairWeighted ap;84 add(ap,beg1,end1,beg2);85 return 1ap.correlation();86 }87 88 68 }; 89 69
Note: See TracChangeset
for help on using the changeset viewer.