yat  0.10.4pre
Public Member Functions
theplu::yat::statistics::PearsonDistance Struct Reference

Calculates the Pearson correlation distance between two points given by elements of ranges. More...

#include </scratch/bob/jari/tmp/pristine/yat-0.10.x/yat/statistics/PearsonDistance.h>

List of all members.

Public Member Functions

template<typename ForwardIterator1 , typename ForwardIterator2 >
double operator() (ForwardIterator1 beg1, ForwardIterator1 end1, ForwardIterator2 beg2) const
 Calculates the Pearson correlation distance between elements of two ranges.

Detailed Description

Calculates the Pearson correlation distance between two points given by elements of ranges.

This class is modelling the concept Distance.


Member Function Documentation

template<typename ForwardIterator1 , typename ForwardIterator2 >
double theplu::yat::statistics::PearsonDistance::operator() ( ForwardIterator1  beg1,
ForwardIterator1  end1,
ForwardIterator2  beg2 
) const
inline

Calculates the Pearson correlation distance between elements of two ranges.

  If elements of both ranges are unweighted the distance is
  calculated as \form#307, where \form#62 and \form#63@_fakenl are the two points and C is the %Pearson correlation.

  If elements of one or both of ranges have weights the distance
  is calculated as \form#308@_fakenl,
  where and \form#280 and \form#68 are weights for the
  elements of the first and the second range, respectively, and

$ m_x=\sum w_{x,i}w_{y,i}x_i/\sum w_{x,i}w_{y,i} $ and correspondingly for $ m_y $. If the elements of one of the two ranges are unweighted, the weights for these elements are set to unity.


The documentation for this struct was generated from the following file:

Generated on Mon Nov 11 2013 09:41:45 for yat by  doxygen 1.8.1