ManagedSparseLinearAlgebraOperations.MultiplyAndAddInPlace Method

Definition

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

Overload List

MultiplyAndAddInPlace(TransposeOperation, Int32, Int32, Complex<Double>, MatrixStructure, MatrixTriangle, MatrixDiagonal, ReadOnlySpan<Complex<Double>>, ReadOnlySpan<Int32>, ReadOnlySpan<Int32>, ReadOnlySpan<Int32>, ReadOnlySpan<Complex<Double>>, Int32, Complex<Double>, Span<Complex<Double>>, Int32)

Multiplies a dense vector by a sparse matrix in Compressed Sparse Column (CSC) format.
C#
public override void MultiplyAndAddInPlace(
	TransposeOperation transA,
	int m,
	int k,
	Complex<double> alpha,
	MatrixStructure structure,
	MatrixTriangle storedTriangle,
	MatrixDiagonal matrixDiagonal,
	ReadOnlySpan<Complex<double>> a,
	ReadOnlySpan<int> aRows,
	ReadOnlySpan<int> aPointerB,
	ReadOnlySpan<int> aPointerE,
	ReadOnlySpan<Complex<double>> x,
	int xStride,
	Complex<double> beta,
	Span<Complex<double>> y,
	int yStride
)

Parameters

transA  TransposeOperation
Specifies the operation to be performed on the matrix a.
m  Int32
The number of rows in the matrix a.
k  Int32
The number of columns in the matrix a.
alpha  Complex<Double>
The scalar used to multiply the matrix-vector product.
structure  MatrixStructure
A MatrixStructure value that specifies the structure of the matrix.
storedTriangle  MatrixTriangle
A MatrixTriangle value that specifies whether the matrix is upper or lower triangular.
matrixDiagonal  MatrixDiagonal
A MatrixDiagonal value that indicates whether the diagonal elements are all 1 or not.
a  ReadOnlySpan<Complex<Double>>
A span that contains the elements of the matrix.
aRows  ReadOnlySpan<Int32>
Integer array that contains the 1-based row indices of the corresponding elements of a.
aPointerB  ReadOnlySpan<Int32>
Integer array of length m containing the 1-based indices into a of the first component of each column.
aPointerE  ReadOnlySpan<Int32>
Integer array of length m containing the 1-based indices into a of the first component of each column.
x  ReadOnlySpan<Complex<Double>>
A reference to a one-dimensional array containing the elements of the vector x.
xStride  Int32
The distance between successive elements in x.
beta  Complex<Double>
The scalar used to multiply y.
y  Span<Complex<Double>>
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.

Implements

ISparseLinearAlgebraOperations<T>.MultiplyAndAddInPlace(TransposeOperation, Int32, Int32, T, MatrixStructure, MatrixTriangle, MatrixDiagonal, ReadOnlySpan<T>, ReadOnlySpan<Int32>, ReadOnlySpan<Int32>, ReadOnlySpan<Int32>, ReadOnlySpan<T>, Int32, T, Span<T>, Int32)

MultiplyAndAddInPlace(TransposeOperation, Int32, Int32, Double, MatrixStructure, MatrixTriangle, MatrixDiagonal, ReadOnlySpan<Double>, ReadOnlySpan<Int32>, ReadOnlySpan<Int32>, ReadOnlySpan<Int32>, ReadOnlySpan<Double>, Int32, Double, Span<Double>, Int32)

Multiplies a dense vector by a sparse matrix in Compressed Sparse Column (CSC) format.
C#
public override void MultiplyAndAddInPlace(
	TransposeOperation transA,
	int m,
	int k,
	double alpha,
	MatrixStructure structure,
	MatrixTriangle storedTriangle,
	MatrixDiagonal matrixDiagonal,
	ReadOnlySpan<double> a,
	ReadOnlySpan<int> aRows,
	ReadOnlySpan<int> aPointerB,
	ReadOnlySpan<int> aPointerE,
	ReadOnlySpan<double> x,
	int xStride,
	double beta,
	Span<double> y,
	int yStride
)

Parameters

transA  TransposeOperation
Specifies the operation to be performed on the matrix a.
m  Int32
The number of rows in the matrix a.
k  Int32
The number of columns in the matrix a.
alpha  Double
The scalar used to multiply the matrix-vector product.
structure  MatrixStructure
A MatrixStructure value that specifies the structure of the matrix.
storedTriangle  MatrixTriangle
A MatrixTriangle value that specifies whether the matrix is upper or lower triangular.
matrixDiagonal  MatrixDiagonal
A MatrixDiagonal value that indicates whether the diagonal elements are all 1 or not.
a  ReadOnlySpan<Double>
A span that contains the elements of the matrix.
aRows  ReadOnlySpan<Int32>
Integer array that contains the 1-based row indices of the corresponding elements of a.
aPointerB  ReadOnlySpan<Int32>
Integer array of length m containing the 1-based indices into a of the first component of each column.
aPointerE  ReadOnlySpan<Int32>
Integer array of length m containing the 1-based indices into a of the first component of each column.
x  ReadOnlySpan<Double>
A reference to a one-dimensional array containing the elements of the vector x.
xStride  Int32
The distance between successive elements in x.
beta  Double
The scalar used to multiply y.
y  Span<Double>
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.

Implements

ISparseLinearAlgebraOperations<T>.MultiplyAndAddInPlace(TransposeOperation, Int32, Int32, T, MatrixStructure, MatrixTriangle, MatrixDiagonal, ReadOnlySpan<T>, ReadOnlySpan<Int32>, ReadOnlySpan<Int32>, ReadOnlySpan<Int32>, ReadOnlySpan<T>, Int32, T, Span<T>, Int32)

MultiplyAndAddInPlace(TransposeOperation, Int32, Int32, Int32, Complex<Double>, MatrixStructure, MatrixTriangle, MatrixDiagonal, ReadOnlySpan<Complex<Double>>, ReadOnlySpan<Int32>, ReadOnlySpan<Int32>, ReadOnlySpan<Int32>, ReadOnlySpan<Complex<Double>>, Int32, Complex<Double>, Span<Complex<Double>>, Int32)

Multiplies a dense matrix by a sparse matrix in Compressed Sparse Column (CSC) format.
C#
public override void MultiplyAndAddInPlace(
	TransposeOperation transA,
	int m,
	int n,
	int k,
	Complex<double> alpha,
	MatrixStructure structure,
	MatrixTriangle storedTriangle,
	MatrixDiagonal matrixDiagonal,
	ReadOnlySpan<Complex<double>> a,
	ReadOnlySpan<int> aRows,
	ReadOnlySpan<int> aPointerB,
	ReadOnlySpan<int> aPointerE,
	ReadOnlySpan<Complex<double>> b,
	int ldb,
	Complex<double> beta,
	Span<Complex<double>> c,
	int ldc
)

Parameters

transA  TransposeOperation
Specifies the operation to be performed on the matrix a.
m  Int32
The number of rows in the matrix a.
n  Int32
The number of columns in the matrix c.
k  Int32
The number of columns in the matrix a.
alpha  Complex<Double>
The scalar used to multiply the matrix-matrix product.
structure  MatrixStructure
A MatrixStructure value that specifies the structure of the matrix.
storedTriangle  MatrixTriangle
A MatrixTriangle value that specifies whether the matrix is upper or lower triangular.
matrixDiagonal  MatrixDiagonal
A MatrixDiagonal value that indicates whether the diagonal elements are all 1 or not.
a  ReadOnlySpan<Complex<Double>>
A span that contains the elements of the matrix.
aRows  ReadOnlySpan<Int32>
Integer array that contains the 1-based row indices of the corresponding elements of a.
aPointerB  ReadOnlySpan<Int32>
Integer array of length n containing the 1-based indices into a of the first component of each column.
aPointerE  ReadOnlySpan<Int32>
Integer array of length n containing the 1-based indices into a of the first component of each column.
b  ReadOnlySpan<Complex<Double>>
A reference to a one-dimensional array containing the elements of the matrix b.
ldb  Int32
The leading dimension of the matrix b.
beta  Complex<Double>
The scalar used to multiply c.
c  Span<Complex<Double>>
A reference to a one-dimensional array containing the elements of the matrix c. The elements of c are overwritten with the result.
ldc  Int32
The leading dimension of the matrix c.

Implements

ISparseLinearAlgebraOperations<T>.MultiplyAndAddInPlace(TransposeOperation, Int32, Int32, Int32, T, MatrixStructure, MatrixTriangle, MatrixDiagonal, ReadOnlySpan<T>, ReadOnlySpan<Int32>, ReadOnlySpan<Int32>, ReadOnlySpan<Int32>, ReadOnlySpan<T>, Int32, T, Span<T>, Int32)

MultiplyAndAddInPlace(TransposeOperation, Int32, Int32, Int32, Double, MatrixStructure, MatrixTriangle, MatrixDiagonal, ReadOnlySpan<Double>, ReadOnlySpan<Int32>, ReadOnlySpan<Int32>, ReadOnlySpan<Int32>, ReadOnlySpan<Double>, Int32, Double, Span<Double>, Int32)

Multiplies a dense matrix by a sparse matrix in Compressed Sparse Column (CSC) format.
C#
public override void MultiplyAndAddInPlace(
	TransposeOperation transA,
	int m,
	int n,
	int k,
	double alpha,
	MatrixStructure structure,
	MatrixTriangle storedTriangle,
	MatrixDiagonal matrixDiagonal,
	ReadOnlySpan<double> a,
	ReadOnlySpan<int> aRows,
	ReadOnlySpan<int> aPointerB,
	ReadOnlySpan<int> aPointerE,
	ReadOnlySpan<double> b,
	int ldb,
	double beta,
	Span<double> c,
	int ldc
)

Parameters

transA  TransposeOperation
Specifies the operation to be performed on the matrix a.
m  Int32
The number of rows in the matrix a.
n  Int32
The number of columns in the matrix c.
k  Int32
The number of columns in the matrix a.
alpha  Double
The scalar used to multiply the matrix-matrix product.
structure  MatrixStructure
A MatrixStructure value that specifies the structure of the matrix.
storedTriangle  MatrixTriangle
A MatrixTriangle value that specifies whether the matrix is upper or lower triangular.
matrixDiagonal  MatrixDiagonal
A MatrixDiagonal value that indicates whether the diagonal elements are all 1 or not.
a  ReadOnlySpan<Double>
A span that contains the elements of the matrix.
aRows  ReadOnlySpan<Int32>
Integer array that contains the 1-based row indices of the corresponding elements of a.
aPointerB  ReadOnlySpan<Int32>
Integer array of length n containing the 1-based indices into a of the first component of each column.
aPointerE  ReadOnlySpan<Int32>
Integer array of length n containing the 1-based indices into a of the first component of each column.
b  ReadOnlySpan<Double>
A reference to a one-dimensional array containing the elements of the matrix b.
ldb  Int32
The leading dimension of the matrix b.
beta  Double
The scalar used to multiply c.
c  Span<Double>
A reference to a one-dimensional array containing the elements of the matrix c. The elements of c are overwritten with the result.
ldc  Int32
The leading dimension of the matrix c.

Implements

ISparseLinearAlgebraOperations<T>.MultiplyAndAddInPlace(TransposeOperation, Int32, Int32, Int32, T, MatrixStructure, MatrixTriangle, MatrixDiagonal, ReadOnlySpan<T>, ReadOnlySpan<Int32>, ReadOnlySpan<Int32>, ReadOnlySpan<Int32>, ReadOnlySpan<T>, Int32, T, Span<T>, Int32)
ISparseLinearAlgebraOperations<T>.MultiplyAndAddInPlace(TransposeOperation, Int32, Int32, Int32, T, MatrixStructure, MatrixTriangle, MatrixDiagonal, ReadOnlySpan<T>, ReadOnlySpan<Int32>, ReadOnlySpan<Int32>, ReadOnlySpan<Int32>, ReadOnlySpan<T>, Int32, T, Span<T>, Int32)

See Also