Complex Kernel Processor<T>.Correlate Method
Definition
Namespace: Numerics.NET.SignalProcessing
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
Overload List
| Correlate( | Computes the cross-correlation of a vector with the stored kernel (allocating). |
| Correlate( | Computes the cross-correlation of a signal with the stored kernel. |
| Correlate( | Computes the cross-correlation of a vector with the stored kernel (non-allocating). |
| Correlate( | Computes the cross-correlation of a complex signal with the stored kernel. |
Correlate(Int32, ReadOnlySpan<Complex<T>>, Int32, Int32, Span<Complex<T>>, Int32)
Computes the cross-correlation of a complex signal with the stored kernel.
public override void Correlate(
int signalLength,
ReadOnlySpan<Complex<T>> signal,
int signalStride,
int resultLength,
Span<Complex<T>> result,
int resultStride
)Parameters
- signalLength Int32
- The length of the input signal.
- signal ReadOnlySpan<Complex<T>>
- A read-only span containing the complex input signal.
- signalStride Int32
- The stride between successive elements in the signal. Use 1 for contiguous data.
- resultLength Int32
- The expected length of the result (should match GetOutputLength(Int32)).
- result Span<Complex<T>>
- A span to store the correlation result. Must have capacity for at least resultLength elements.
- resultStride Int32
- The stride between successive elements in the result. Use 1 for contiguous output.
Remarks
Complex correlation computes: y[n] = Σ_m x[n - (m - a)] · conj(h[m]), where a is the anchor index and conj() denotes complex conjugation. This operation is commonly used for template matching and signal similarity measurement in the complex domain.
The kernel conjugation is applied once at the start of the operation, not repeated for each output sample, ensuring optimal performance.