mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-06 04:57:44 +00:00
xml doc rewrite
This commit is contained in:
@@ -1,5 +1,16 @@
|
||||
using System;
|
||||
namespace QuanTAlib;
|
||||
|
||||
/// <summary>
|
||||
/// Convolution: A fundamental signal processing operation that combines two signals to form a third signal
|
||||
/// Applies a custom kernel (weight array) to the input data through convolution, allowing for flexible
|
||||
/// filtering operations. The kernel is automatically normalized to ensure consistent output scaling.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Implementation:
|
||||
/// Based on standard discrete convolution principles from signal processing
|
||||
/// </remarks>
|
||||
|
||||
public class Convolution : AbstractBase
|
||||
{
|
||||
private readonly double[] _kernel;
|
||||
@@ -7,6 +18,8 @@ public class Convolution : AbstractBase
|
||||
private readonly CircularBuffer _buffer;
|
||||
private readonly double[] _normalizedKernel;
|
||||
|
||||
/// <param name="kernel">Array of weights defining the convolution operation. The length of this array determines the filter's window size.</param>
|
||||
/// <exception cref="ArgumentException">Thrown when kernel is null or empty.</exception>
|
||||
public Convolution(double[] kernel)
|
||||
{
|
||||
if (kernel == null || kernel.Length == 0)
|
||||
@@ -20,6 +33,8 @@ public class Convolution : AbstractBase
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <param name="source">The data source object that publishes updates.</param>
|
||||
/// <param name="kernel">Array of weights defining the convolution operation.</param>
|
||||
public Convolution(object source, double[] kernel) : this(kernel)
|
||||
{
|
||||
var pubEvent = source.GetType().GetEvent("Pub");
|
||||
@@ -100,4 +115,4 @@ public class Convolution : AbstractBase
|
||||
|
||||
return sum;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user