Engauge Digitizer  2
Public Member Functions | List of all members
Correlation Class Reference

Fast cross correlation between two functions. More...

#include <Correlation.h>

Public Member Functions

 Correlation (int N)
 Single constructor. Slow memory allocations are done once and then reused repeatedly.
 
void correlateWithShift (int N, const double function1[], const double function2[], int &binStartMax, double &corrMax) const
 Return the shift in function1 that best aligns that function with function2. More...
 
void correlateWithoutShift (int N, const double function1[], const double function2[], double &corrMax) const
 Return the correlation of the two functions, without any shift. More...
 

Detailed Description

Fast cross correlation between two functions.

Definition at line 7 of file Correlation.h.

Member Function Documentation

void Correlation::correlateWithoutShift ( int  N,
const double  function1[],
const double  function2[],
double &  corrMax 
) const

Return the correlation of the two functions, without any shift.

The functions are normalized internally.

Definition at line 111 of file Correlation.cpp.

void Correlation::correlateWithShift ( int  N,
const double  function1[],
const double  function2[],
int &  binStartMax,
double &  corrMax 
) const

Return the shift in function1 that best aligns that function with function2.

The functions are normalized internally.

Definition at line 39 of file Correlation.cpp.


The documentation for this class was generated from the following files: