Double1DConvolution represents a 1D convolution, 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 Double1DConvolution : ConvolutionBase, 
	ICloneable
Visual Basic
<SerializableAttribute> _
Public Class Double1DConvolution _
	Inherits ConvolutionBase _
	Implements ICloneable
Visual C++
[SerializableAttribute]
public ref class Double1DConvolution : public ConvolutionBase, 
	ICloneable

Remarks

The convolution length = length_of_data + length_of_kernel - 1. Mathematically, the kernel and the input data can be interchanged without changing the convolution result. However, in practice, often the kernel is much shorter than the data and is used over many convolution 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 convolution operations.

Examples

 Copy imageCopy
// 1D Convolution example
// Moving average filter of length 5
   double[] kernel = { .2, .2, .2, .2, .2 };
   double[] data = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };

   Double1DConvolution conv = new Double1DConvolution(kernel, data.Length);
   double[] z = new double[conv.Length];

   conv.Convolve(data, ref z);

// Now z contains the convolution result, z = kernel*data, of length 13.

Inheritance Hierarchy

System..::..Object
  CenterSpace.NMath.Core..::..ConvolutionBase
    CenterSpace.NMath.Core..::..Double1DConvolution

See Also