Ignore:
Timestamp:
Feb 21, 2008, 8:20:59 PM (14 years ago)
Author:
Markus Ringnér
Message:

Fixes #254 and #295

File:
1 edited

Legend:

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

    r1093 r1115  
    3838  ///
    3939  /// @brief Calculates the Euclidean distance between two points
    40   /// stored in 1-dimensional containers. Implements the concept \ref
    41   /// concept_distance.
     40  /// given by elements of ranges.
     41  ///
     42  /// This class is modelling the concept \ref concept_distance.
    4243  ///
    4344  ///
     
    4546  {   
    4647    /**
    47        \brief Calculates the Euclidean distance between two ranges.
     48       \brief Calculates the Euclidean distance between elements of
     49       two ranges.
    4850   
    49        If both ranges are unweighted the distance is calculated as \f$
    50        \sqrt{\sum (x_i-y_i)^2 } \f$
     51       If elements of both ranges are unweighted the distance is
     52       calculated as \f$ \sqrt{\sum (x_i-y_i)^2 } \f$, where \f$ x_i
     53       \f$ and \f$ y_i \f$ are elements of the first and second range,
     54       respectively.
    5155
    52        Else distance is calculated as \f$ N \frac{\sum
    53        w_xw_y(x-y)^2}{\sum w_xw_y} \f$
     56       If elements of one or both of ranges have weights the distance
     57       is calculated as \f$ \sqrt{N \sum
     58       w_{x,i}w_{y,i}(x_i-y_i)^2/\sum w_{x,i}w_{y,i}} \f$, where \f$ N
     59       \f$ is the number of elements in the two ranges and \f$ w_x \f$
     60       and \f$ w_y \f$ are weights for the elements of the first and
     61       the second range, respectively. If the elements of one of the
     62       two ranges are unweighted, the weights for these elements are
     63       set to unity.
    5464    */
    5565    template <typename Iter1, typename Iter2>
Note: See TracChangeset for help on using the changeset viewer.