name: Correlation : public AlgorithmBase

synopsis:

g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_algo.a

#include <Correlation.h>

Correlation(ALGORITHM algorithm = DEF_ALGORITHM, IMPLEMENTATION implementation = DEF_IMPLEMENTATION, NORMALIZATION normalization = DEF_NORMALIZATION, long order = DEF_ORDER);
boolean eq(const Correlation& arg);
boolean assign(const Correlation& arg);
boolean setAlgorithm(ALGORITHM algorithm);
boolean setNormalization(NORMALIZATION normalization);
boolean setOrder(long order);
boolean compute(VectorFloat& output, const VectorFloat& input, AlgorithmData::COEF_TYPE input_coef_type = DEF_COEF_TYPE);
quick start:

VectorFloat input(L"1.0, 2.0, 3.0, 4.0, 5.0");
VectorFloat output;
Correlation corr(3);
corr.compute(output, input);
description:



The Correlation class implements three types of correlation operations: autocorrelation (including a tapered version intended to reduce bias), cross-correlation, and convolution. A good overview of correlation operators can be found in: The mathematical descriptions of the algorithms implemented in this class are shown below:


The only design parameter relevant to this class is the analysis order, which only applies to the autocorrelation algorithm choice.

The autocorrelation algorithm choice, denoted AUTO, supports computations using various data types including signals and linear prediction coefficients. Two computation modes are supported: factored and unfactored. Unfactored is the standard dot product formulation. The factored implementation is a computationally efficient approach described in: Conversions from linear prediction coefficients to correlation functions are also supported using recursions described in: The convolution and cross-correlation algorithms are described in: The convolution and cross-correlation algorithms do not support a FACTORED implementation, and operate only on signal data.

The result of these computations can be scaled using the normalization mode. LENGTH simply divides the result by the number of samples used to compute each term in the computation. For the algorithm AUTO_TAPERED, this is the length of the vector minus the lag value (e.g., N-i). UNIT_ENERGY scales the result so that the energy of the signal is unity.

dependencies:

public constants:

error codes:

protected data:

required public methods:

class-specific public methods:

private methods:

examples:

notes: