Float1DCorrelation represents a 1D correlation, with a specified kernel and data length.
Namespace:
CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 5.1.0.0
Syntax
| C# |
|---|
[SerializableAttribute] public class Float1DCorrelation : CorrelationBase, ICloneable |
| Visual Basic (Declaration) |
|---|
<SerializableAttribute> _ Public Class Float1DCorrelation _ Inherits CorrelationBase _ Implements ICloneable |
| Visual C++ |
|---|
[SerializableAttribute] public ref class Float1DCorrelation : 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
FloatVector kernel = new FloatVector(1, 2, 3, 1); FloatVector data = new FloatVector(1, 2, 3, 4, 5, 6); Float1DCorrelation corr = new Float1DCorrelation(kernel, data.Length); FloatVector correlation = corr.Correlate(data); FloatVector corr_full_kernel_overlap = corr.TrimConvolution(correlation, CorrelationBase.Windowing.FullKernelOverlap); FloatVector 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..::.Float1DCorrelation
CenterSpace.NMath.Core..::.CorrelationBase
CenterSpace.NMath.Core..::.Float1DCorrelation