Matrix.MultiplyInto Method

Definition

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

Overload List

MultiplyInto<T>(LinearOperator<T>, Matrix<T>, Matrix<T>) Multiplies a matrix and a matrix.
MultiplyInto<T>(LinearOperator<T>, Vector<T>, Vector<T>) Multiplies a matrix and a vector.
MultiplyInto<T>(Matrix<T>, T, Matrix<T>) Multiplies a matrix by a scalar.
MultiplyInto<T>(Matrix<T>, Vector<T>, Vector<T>) Multiplies a vector by a matrix.
MultiplyInto<T>(T, Matrix<T>, Matrix<T>) Multiplies a matrix by a scalar.
MultiplyInto<T>(LinearOperator<T>, TransposeOperation, Matrix<T>, Matrix<T>) Multiplies a possibly transposed matrix and a matrix.
MultiplyInto<T>(LinearOperator<T>, TransposeOperation, Vector<T>, Vector<T>) Multiplies a possibly transposed matrix and a vector.
MultiplyInto<T>(Matrix<T>, TransposeOperation, Vector<T>, Vector<T>) Multiplies a vector by a matrix.
MultiplyInto<T>(Matrix<T>, TransposeOperation, Matrix<T>, TransposeOperation, Matrix<T>) Multiplies one matrix by another matrix and returns the result.

MultiplyInto<T>(LinearOperator<T>, Matrix<T>, Matrix<T>)

Multiplies a matrix and a matrix.
C#
public static Matrix<T> MultiplyInto<T>(
	LinearOperator<T> left,
	Matrix<T> right,
	Matrix<T> result
)

Parameters

left  LinearOperator<T>
The left operand.
right  Matrix<T>
The right operand.
result  Matrix<T>
The matrix that is to hold the result. May be null.

Type Parameters

T

Return Value

Matrix<T>
The product of leftwith the matrix right.

MultiplyInto<T>(LinearOperator<T>, Vector<T>, Vector<T>)

Multiplies a matrix and a vector.
C#
public static Vector<T> MultiplyInto<T>(
	LinearOperator<T> left,
	Vector<T> right,
	Vector<T> result
)

Parameters

left  LinearOperator<T>
The left operand.
right  Vector<T>
The right operand.
result  Vector<T>
The vector that is to hold the result. May be null.

Type Parameters

T

Return Value

Vector<T>
The product of leftwith the vector right.

MultiplyInto<T>(Matrix<T>, T, Matrix<T>)

Multiplies a matrix by a scalar.
C#
public static Matrix<T> MultiplyInto<T>(
	Matrix<T> matrix,
	T factor,
	Matrix<T> result
)

Parameters

matrix  Matrix<T>
A matrix.
factor  T
A number.
result  Matrix<T>
The matrix that is to hold the result. May be null.

Type Parameters

T

Return Value

Matrix<T>
A matrix whose elements are the corresponding elements of matrix multiplied by factor.

Exceptions

ArgumentNullExceptionmatrix is null

MultiplyInto<T>(Matrix<T>, Vector<T>, Vector<T>)

Multiplies a vector by a matrix.
C#
public static Vector<T> MultiplyInto<T>(
	Matrix<T> matrix,
	Vector<T> vector,
	Vector<T> result
)

Parameters

matrix  Matrix<T>
A matrix.
vector  Vector<T>
A vector.
result  Vector<T>
The vector that is to hold the result. May be null.

Type Parameters

T

Return Value

Vector<T>

Exceptions

ArgumentNullException

matrix is null

-or-

vector is null

MultiplyInto<T>(T, Matrix<T>, Matrix<T>)

Multiplies a matrix by a scalar.
C#
public static Matrix<T> MultiplyInto<T>(
	T factor,
	Matrix<T> matrix,
	Matrix<T> result
)

Parameters

factor  T
A number.
matrix  Matrix<T>
A matrix.
result  Matrix<T>
The matrix that is to hold the result. May be null.

Type Parameters

T

Return Value

Matrix<T>
A matrix whose elements are the corresponding elements of matrix multiplied by factor.

Exceptions

ArgumentNullExceptionmatrix is null

MultiplyInto<T>(LinearOperator<T>, TransposeOperation, Matrix<T>, Matrix<T>)

Multiplies a possibly transposed matrix and a matrix.
C#
public static Matrix<T> MultiplyInto<T>(
	LinearOperator<T> left,
	TransposeOperation transpose,
	Matrix<T> right,
	Matrix<T> result
)

Parameters

left  LinearOperator<T>
The left operand.
transpose  TransposeOperation
The operation to be performed on the matrix left before multiplying.
right  Matrix<T>
The right operand.
result  Matrix<T>
The matrix that is to hold the result. May be null.

Type Parameters

T

Return Value

Matrix<T>
The product of left, transformed as specified by transpose, with the matrix right.

MultiplyInto<T>(LinearOperator<T>, TransposeOperation, Vector<T>, Vector<T>)

Multiplies a possibly transposed matrix and a vector.
C#
public static Vector<T> MultiplyInto<T>(
	LinearOperator<T> left,
	TransposeOperation transpose,
	Vector<T> right,
	Vector<T> result
)

Parameters

left  LinearOperator<T>
The left operand.
transpose  TransposeOperation
The operation to be performed on the matrix left before multiplying.
right  Vector<T>
The right operand.
result  Vector<T>
The vector that is to hold the result. May be null.

Type Parameters

T

Return Value

Vector<T>
The product of left, transformed as specified by transpose, with the vector right.

MultiplyInto<T>(Matrix<T>, TransposeOperation, Vector<T>, Vector<T>)

Multiplies a vector by a matrix.
C#
public static Vector<T> MultiplyInto<T>(
	Matrix<T> matrix,
	TransposeOperation operation,
	Vector<T> vector,
	Vector<T> result
)

Parameters

matrix  Matrix<T>
A matrix.
operation  TransposeOperation
The operation to apply to matrix before multiplying.
vector  Vector<T>
A vector.
result  Vector<T>
The vector that is to hold the result. May be null.

Type Parameters

T

Return Value

Vector<T>

Exceptions

ArgumentNullException

matrix is null

-or-

vector is null

MultiplyInto<T>(Matrix<T>, TransposeOperation, Matrix<T>, TransposeOperation, Matrix<T>)

Multiplies one matrix by another matrix and returns the result.
C#
public static Matrix<T> MultiplyInto<T>(
	Matrix<T> left,
	TransposeOperation leftOperation,
	Matrix<T> right,
	TransposeOperation rightOperation,
	Matrix<T> result
)

Parameters

left  Matrix<T>
The left operand of the multiplication.
leftOperation  TransposeOperation
A TransposeOperation value that indicates which operation, if any, should be performed on this instance before multiplying.
right  Matrix<T>
The right operand of the multiplication.
rightOperation  TransposeOperation
A TransposeOperation value that indicates which operation, if any, should be performed on the matrix right before multiplying.
result  Matrix<T>
The matrix that is to hold the result. May be null.

Type Parameters

T

Return Value

Matrix<T>
A matrix that is the product of the matrix left, transformed as specified by leftOperation, with the matrix right, transformed as specified by rightOperation.

Remarks

This method calculates the matrix product of two matrices. The exact form of the operation is determined by the other parameters. The dimensions of the two matrices must be compatible with this form.

Exceptions

ArgumentNullException

left is null.

-or-

right is null.

See Also