DenseMatrix<T>.Multiply Method

Definition

Namespace: Extreme.Mathematics.LinearAlgebra
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

Multiply(Matrix<T>) Multiplies this matrix on the right by a square Matrix<T>.
Multiply(Vector<T>)Applies the linear operator to a vector.
Multiply(DenseMatrix<T>, DenseMatrix<T>) Multiplies two matrix objects.
Multiply(TransposeOperation, Matrix<T>) Multiplies a matrix on the left by this matrix.
Obsolete.
Multiply(TransposeOperation, Vector<T>) Multiplies a vector on the left by this vector.
Obsolete.
Multiply(DenseMatrix<T>, DenseMatrix<T>, DenseMatrix<T>) Multiplies two DenseMatrix<T> objects and stores the result in a third DenseMatrix<T>.
Multiply(MatrixOperationSide, TransposeOperation, TransposeOperation, Matrix<T>) Multiplies this matrix by another matrix and returns the result.
Obsolete.

Multiply(Matrix<T>)

Multiplies this matrix on the right by a square Matrix<T>.
C#
public DenseMatrix<T> Multiply(
	Matrix<T> matrix
)

Parameters

matrix  Matrix<T>
The second Matrix<T>.

Return Value

DenseMatrix<T>
A reference to this instance, which is the product of the original DenseMatrix<T> with matrix.

Remarks

The matrix matrix must be square, and the number of rows and columns of matrix must be equal to the number of columns of this instance. Otherwise, an exception of type DimensionMismatchException is thrown.

Exceptions

ArgumentNullExceptionmatrix is null.
DimensionMismatchExceptionThe number of rows of matrix does not match the number of columns in this matrix,

-or-

matrix is not square.

Multiply(DenseMatrix<T>, DenseMatrix<T>)

Multiplies two matrix objects.
C#
public static DenseMatrix<T> Multiply(
	DenseMatrix<T> matrix1,
	DenseMatrix<T> matrix2
)

Parameters

matrix1  DenseMatrix<T>
The first DenseMatrix<T>.
matrix2  DenseMatrix<T>
The second DenseMatrix<T>.

Return Value

DenseMatrix<T>
A DenseMatrix<T> that is the product of matrix1 and matrix2.

Remarks

The number of columns of matrix1 must be equal to the number of rows of matrix2. Otherwise, an exception of type DimensionMismatchException is thrown.

This method uses the BLAS routine DGEMM.

Exceptions

ArgumentNullExceptionmatrix1 is null

-or-

matrix2 is null

DimensionMismatchExceptionThe number of columns of matrix1 does not equal the number of rows of matrix2.

Multiply(DenseMatrix<T>, DenseMatrix<T>, DenseMatrix<T>)

Multiplies two DenseMatrix<T> objects and stores the result in a third DenseMatrix<T>.
C#
public static DenseMatrix<T> Multiply(
	DenseMatrix<T> matrix1,
	DenseMatrix<T> matrix2,
	DenseMatrix<T> resultMatrix
)

Parameters

matrix1  DenseMatrix<T>
A DenseMatrix<T> that is the left factor of the multiplication.
matrix2  DenseMatrix<T>
A DenseMatrix<T> that is the right factor of the multiplication.
resultMatrix  DenseMatrix<T>
A DenseMatrix<T> that is to receive the result of the multiplication.

Return Value

DenseMatrix<T>
A reference to resultMatrix.

Remarks

The number of columns of matrix1 must be equal to the number of rows of matrix2. The number of rows of matrix1 must be equal to the number of rows of resultMatrix. The number of columns of matrix2 must be equal to the number of columns of resultMatrix. Otherwise, an exception of type DimensionMismatchException is thrown.

This method uses the BLAS routine DGEMM.

Exceptions

ArgumentNullExceptionmatrix1 is null

-or-

matrix2 is null

-or-

resultMatrix is null

DimensionMismatchException The number of rows of matrix1 does not equal the number of rows of resultMatrix.

-or-

The number of columns of matrix1 does not equal the number of columns of resultMatrix.

-or-

The number of columns of matrix1 does not equal the number of rows of matrix2.

See Also