Ignore:
Timestamp:
Sep 25, 2007, 11:35:25 AM (14 years ago)
Author:
Markus Ringnér
Message:

Refs #245 #246 #247

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/statistics/euclidean_vector_distance.h

    r889 r890  
    55
    66#include "AveragerPair.h"
     7#include "AveragerPairWeighted.h"
    78#include "vector_distance.h"
    89
     
    4041  }
    4142 
     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
    4259 
    4360}}} // of namespace statistics, yat, and theplu
Note: See TracChangeset for help on using the changeset viewer.