SparseLinearAlgebraOperations<T>.DotProduct Method

Definition

Namespace: Numerics.NET.LinearAlgebra.Implementation
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4

Overload List

DotProduct(Int32, ReadOnlySpan<T>, ReadOnlySpan<Int32>, Int32, ReadOnlySpan<T>, Int32)

Returns the dot product of a sparse and a dense vector.
C#
public virtual T DotProduct(
	int n,
	ReadOnlySpan<T> x,
	ReadOnlySpan<int> indx,
	int m,
	ReadOnlySpan<T> y,
	int yStride
)

Parameters

n  Int32
The number of elements in the vectors x and y.
x  ReadOnlySpan<T>
A reference to a one-dimensional array containing the elements of the vector x.
indx  ReadOnlySpan<Int32>
Integer array of component indices.
m  Int32
The length of the vector y.
y  ReadOnlySpan<T>
A reference to a one-dimensional array containing the elements of the vector y. The elements of y are overwritten with the result.
yStride  Int32
The distance between successive elements in y.

Return Value

T

Implements

ISparseLinearAlgebraOperations<T>.DotProduct(Int32, ReadOnlySpan<T>, ReadOnlySpan<Int32>, Int32, ReadOnlySpan<T>, Int32)

DotProduct(Int32, ReadOnlySpan<Complex<T>>, ReadOnlySpan<Int32>, Int32, ReadOnlySpan<Complex<T>>, Int32)

Returns the dot product of a sparse and a dense vector.
C#
public virtual Complex<T> DotProduct(
	int n,
	ReadOnlySpan<Complex<T>> x,
	ReadOnlySpan<int> indx,
	int m,
	ReadOnlySpan<Complex<T>> y,
	int yStride
)

Parameters

n  Int32
The number of elements in the vectors x and y.
x  ReadOnlySpan<Complex<T>>
A reference to a one-dimensional array containing the elements of the vector x.
indx  ReadOnlySpan<Int32>
Integer array of component indices.
m  Int32
The length of the vector y.
y  ReadOnlySpan<Complex<T>>
A reference to a one-dimensional array containing the elements of the vector y. The elements of y are overwritten with the result.
yStride  Int32
The distance between successive elements in y.

Return Value

Complex<T>

Implements

ISparseLinearAlgebraOperations<T>.DotProduct(Int32, ReadOnlySpan<T>, ReadOnlySpan<Int32>, Int32, ReadOnlySpan<T>, Int32)

See Also