SignalMath.AutoCorrelate Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0

Overload List

AutoCorrelate<T>(Vector<T>, ConvolutionMode) Computes the autocorrelation of a real-valued vector and returns the result.
AutoCorrelate<T>(Vector<Complex<T>>, ConvolutionMode) Computes the autocorrelation of a complex-valued vector and returns the result.
AutoCorrelate<T>(ReadOnlySpan<T>, Span<T>, ConvolutionMode) Computes the autocorrelation of a real signal.
AutoCorrelate<T>(ReadOnlySpan<Complex<T>>, Span<Complex<T>>, ConvolutionMode) Computes the autocorrelation of a complex signal.
AutoCorrelate<T>(Vector<T>, Vector<T>, ConvolutionMode) Computes the autocorrelation of a real-valued vector.
AutoCorrelate<T>(Vector<Complex<T>>, Vector<Complex<T>>, ConvolutionMode) Computes the autocorrelation of a complex-valued vector.
AutoCorrelate<T>(Int32, ReadOnlySpan<T>, Int32, Int32, Span<T>, Int32, ConvolutionMode) Computes the autocorrelation of a real signal.
AutoCorrelate<T>(Int32, ReadOnlySpan<Complex<T>>, Int32, Int32, Span<Complex<T>>, Int32, ConvolutionMode) Computes the autocorrelation of a complex signal.

AutoCorrelate<T>(Vector<T>, ConvolutionMode)

Computes the autocorrelation of a real-valued vector and returns the result.
C#
public static Vector<T> AutoCorrelate<T>(
	Vector<T> x,
	ConvolutionMode shape = ConvolutionMode.FullLength
)

Parameters

x  Vector<T>
The input signal vector.
shape  ConvolutionMode  (Optional)
The output shape mode.

Type Parameters

T
The element type (double or float).

Return Value

Vector<T>
A vector containing the autocorrelation result.

Exceptions

ArgumentNullException Thrown when x is null.

AutoCorrelate<T>(Vector<Complex<T>>, ConvolutionMode)

Computes the autocorrelation of a complex-valued vector and returns the result.
C#
public static Vector<Complex<T>> AutoCorrelate<T>(
	Vector<Complex<T>> x,
	ConvolutionMode shape = ConvolutionMode.FullLength
)

Parameters

x  Vector<Complex<T>>
The input signal vector.
shape  ConvolutionMode  (Optional)
The output shape mode.

Type Parameters

T
The element type (double or float).

Return Value

Vector<Complex<T>>
A vector containing the autocorrelation result.

Exceptions

ArgumentNullException Thrown when x is null.

AutoCorrelate<T>(ReadOnlySpan<T>, Span<T>, ConvolutionMode)

Computes the autocorrelation of a real signal.
C#
public static void AutoCorrelate<T>(
	ReadOnlySpan<T> x,
	Span<T> result,
	ConvolutionMode shape = ConvolutionMode.FullLength
)

Parameters

x  ReadOnlySpan<T>
The input signal.
result  Span<T>
The output span to hold the autocorrelation result.
shape  ConvolutionMode  (Optional)
The output shape mode.

Type Parameters

T
The element type (double or float).

Exceptions

ArgumentException Thrown when the result span is too small for the requested output shape.

AutoCorrelate<T>(ReadOnlySpan<Complex<T>>, Span<Complex<T>>, ConvolutionMode)

Computes the autocorrelation of a complex signal.
C#
public static void AutoCorrelate<T>(
	ReadOnlySpan<Complex<T>> x,
	Span<Complex<T>> result,
	ConvolutionMode shape = ConvolutionMode.FullLength
)

Parameters

x  ReadOnlySpan<Complex<T>>
The input signal.
result  Span<Complex<T>>
The output span to hold the autocorrelation result.
shape  ConvolutionMode  (Optional)
The output shape mode.

Type Parameters

T
The element type (double or float).

Exceptions

ArgumentException Thrown when the result span is too small for the requested output shape.

AutoCorrelate<T>(Vector<T>, Vector<T>, ConvolutionMode)

Computes the autocorrelation of a real-valued vector.
C#
public static void AutoCorrelate<T>(
	Vector<T> x,
	Vector<T> output,
	ConvolutionMode shape = ConvolutionMode.FullLength
)

Parameters

x  Vector<T>
The input signal vector.
output  Vector<T>
The output vector to hold the autocorrelation result.
shape  ConvolutionMode  (Optional)
The output shape mode.

Type Parameters

T
The element type (double or float).

Exceptions

ArgumentNullException Thrown when x or output is null.
ArgumentException Thrown when the output vector length does not match the expected size for the given shape.

AutoCorrelate<T>(Vector<Complex<T>>, Vector<Complex<T>>, ConvolutionMode)

Computes the autocorrelation of a complex-valued vector.
C#
public static void AutoCorrelate<T>(
	Vector<Complex<T>> x,
	Vector<Complex<T>> output,
	ConvolutionMode shape = ConvolutionMode.FullLength
)

Parameters

x  Vector<Complex<T>>
The input signal vector.
output  Vector<Complex<T>>
The output vector to hold the autocorrelation result.
shape  ConvolutionMode  (Optional)
The output shape mode.

Type Parameters

T
The element type (double or float).

Exceptions

ArgumentNullException Thrown when x or output is null.
ArgumentException Thrown when the output vector length does not match the expected size for the given shape.

AutoCorrelate<T>(Int32, ReadOnlySpan<T>, Int32, Int32, Span<T>, Int32, ConvolutionMode)

Computes the autocorrelation of a real signal.
C#
public static void AutoCorrelate<T>(
	int xLength,
	ReadOnlySpan<T> x,
	int xStride,
	int resultLength,
	Span<T> result,
	int resultStride,
	ConvolutionMode shape = ConvolutionMode.FullLength
)

Parameters

xLength  Int32
The number of elements in the signal.
x  ReadOnlySpan<T>
The input signal.
xStride  Int32
The stride between successive elements in x.
resultLength  Int32
The number of elements in the result.
result  Span<T>
The output span to hold the autocorrelation result.
resultStride  Int32
The stride between successive elements in result.
shape  ConvolutionMode  (Optional)
The output shape mode.

Type Parameters

T
The element type (double or float).

Exceptions

ArgumentException Thrown when the result span is too small for the requested output shape.

AutoCorrelate<T>(Int32, ReadOnlySpan<Complex<T>>, Int32, Int32, Span<Complex<T>>, Int32, ConvolutionMode)

Computes the autocorrelation of a complex signal.
C#
public static void AutoCorrelate<T>(
	int xLength,
	ReadOnlySpan<Complex<T>> x,
	int xStride,
	int resultLength,
	Span<Complex<T>> result,
	int resultStride,
	ConvolutionMode shape = ConvolutionMode.FullLength
)

Parameters

xLength  Int32
The number of elements in the signal.
x  ReadOnlySpan<Complex<T>>
The input signal.
xStride  Int32
The stride between successive elements in x.
resultLength  Int32
The number of elements in the result.
result  Span<Complex<T>>
The output span to hold the autocorrelation result.
resultStride  Int32
The stride between successive elements in result.
shape  ConvolutionMode  (Optional)
The output shape mode.

Type Parameters

T
The element type (double or float).

Exceptions

ArgumentException Thrown when the result span is too small for the requested output shape.

See Also