FloatComplex1DCorrelation represents a 1D correlation, with a specified kernel and data length.

Namespace: CenterSpace.NMath.Core
Assembly: NMathPremium (in NMathPremium.dll) Version: 5.3.0.0

Syntax

C#
[SerializableAttribute]
public class FloatComplex1DCorrelation : CorrelationBase, 
	ICloneable
Visual Basic
<SerializableAttribute> _
Public Class FloatComplex1DCorrelation _
	Inherits CorrelationBase _
	Implements ICloneable
Visual C++
[SerializableAttribute]
public ref class FloatComplex1DCorrelation : public CorrelationBase, 
	ICloneable

Remarks

The length of the correlation = length_of_data + length_of_kernel - 1. In general, unlike convolution, correlation is a non-communitive operation. Typically the kernel is shorter than the data and is used over many correlations operations against different data sets. This class is designed to be used in that fashion and the higest performance will be acheived if the kernel is fixed over a series of correlation operations.

Examples

 Copy imageCopy
FloatComplexVector kernel = new FloatComplexVector(1, 2, 3, 1);
FloatComplexVector data = new FloatComplexVector(1, 2, 3, 4, 5, 6);

FloatComplex1DCorrelation corr = new FloatComplex1DCorrelation(kernel, data.Length);
FloatComplexVector correlation = corr.Correlate(data);

FloatComplexVector corr_full_kernel_overlap = corr.TrimConvolution(correlation, CorrelationBase.Windowing.FullKernelOverlap);
FloatComplexVector corr_centered = corr.TrimConvolution(correlation, CorrelationBase.Windowing.CenterWindow);

// correlation =            [1 5 11 18 25 32 32 17 6]
// corr_centered =              [11 18 25 32 32 17]
// corr_full_kernel_overlap =      [18 25 32]

Inheritance Hierarchy

System..::..Object
  CenterSpace.NMath.Core..::..CorrelationBase
    CenterSpace.NMath.Core..::..FloatComplex1DCorrelation

See Also