Click or drag to resize

DoubleComplex1DCorrelation Class

DoubleComplex1DCorrelation represents a 1D correlation, with a specified kernel and data length.
Inheritance Hierarchy
SystemObject
  CenterSpace.NMath.CoreCorrelationBase
    CenterSpace.NMath.CoreDoubleComplex1DCorrelation

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 7.3
Syntax
[SerializableAttribute]
public class DoubleComplex1DCorrelation : CorrelationBase, 
	ICloneable

The DoubleComplex1DCorrelation type exposes the following members.

Constructors
  NameDescription
Public methodDoubleComplex1DCorrelation(DoubleComplex, Int32)
Constructs a correlation instance and defines the correlation kernel, and input signal data length.
Public methodDoubleComplex1DCorrelation(DoubleComplexVector, Int32)
Constructs a correlation instance and defines the correlation kernel, and input signal data length.
Public methodDoubleComplex1DCorrelation(DoubleComplex, Int32, Int32, Int32)
Constructs a correlation instance and defines the correlation kernel with a given offset and stride.
Top
Properties
  NameDescription
Public propertyDataLength
Gets the length of the correlation data.
(Inherited from CorrelationBase.)
Public propertyKernelLength
Gets the length of the correlation kernel.
(Inherited from CorrelationBase.)
Public propertyKernelShape
Gets the shape of the convolution kernel.
(Inherited from CorrelationBase.)
Public propertyLength
Gets the length of the correlation.
(Inherited from CorrelationBase.)
Top
Methods
  NameDescription
Public methodClone
Creates a deep copy of this correlation instance.
Public methodCorrelate(DoubleComplex)
Computes the correlation between the stored correlation kernel, and the vector data.
Public methodCorrelate(DoubleComplexVector)
Computes the correlation between the stored correlation kernel, and the vector data.
Public methodCorrelate(DoubleComplex, DoubleComplex)
Computes the correlation between the stored correlation kernel, and the vector data.
Public methodCorrelate(DoubleComplexVector, DoubleComplexVector)
Computes the correlation between the stored correlation kernel, and the vector data.
Public methodDispose
Clean up resources.
(Inherited from CorrelationBase.)
Protected methodFinalize
Provides non-deterministic destruction of underlying unmanaged resources.
(Inherited from CorrelationBase.)
Public methodTrimCorrelation(DoubleComplexVector, CorrelationBaseWindowing)
Creates a clipped view into the correlation. This does not create a copy of the input correlation.
Protected methodTrimCorrelationT(T, CorrelationBaseWindowing)
Creates a windowed view into the correlation. This does not create a copy of the input correlation.
(Inherited from CorrelationBase.)
Top
Fields
  NameDescription
Protected fieldkerneloffset_
Offset into correlation kernel.
(Inherited from CorrelationBase.)
Protected fieldkernelstride_
Correlation kernel stride.
(Inherited from CorrelationBase.)
Protected fieldmode_
Mode is either automatic, fft, or direct sum.
(Inherited from CorrelationBase.)
Top
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
DoubleComplexVector kernel = new DoubleComplexVector(1, 2, 3, 1);
DoubleComplexVector data = new DoubleComplexVector(1, 2, 3, 4, 5, 6);

DoubleComplex1DCorrelation corr = new DoubleComplex1DCorrelation(kernel, data.Length);
DoubleVector correlation = corr.Correlate(data);

DoubleComplexVector corr_full_kernel_overlap = corr.TrimConvolution(correlation, CorrelationBase.Windowing.FullKernelOverlap);
DoubleComplexVector 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]
See Also