Changeset 890 for trunk/yat/statistics/euclidean_vector_distance.h
 Timestamp:
 Sep 25, 2007, 11:35:25 AM (14 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/yat/statistics/euclidean_vector_distance.h
r889 r890 5 5 6 6 #include "AveragerPair.h" 7 #include "AveragerPairWeighted.h" 7 8 #include "vector_distance.h" 8 9 … … 40 41 } 41 42 43 44 /// 45 /// implementation for distances between vectors 46 /// (containers with random access iterators) using a Euclidean 47 /// distance measure and iterators to weighted containers. 48 /// 49 template <class Iter> 50 double vector_distance(Iter beg1,Iter end1, Iter beg2, 51 const euclidean_vector_distance_tag& disttype, 52 std::weighted_random_access_iterator_tag) 53 { 54 AveragerPairWeighted ap; 55 add(ap,beg1,end1,beg2); 56 return sqrt(ap.sum_squared_deviation()); 57 } 58 42 59 43 60 }}} // of namespace statistics, yat, and theplu
Note: See TracChangeset
for help on using the changeset viewer.