Operator Reference

mult_matrix_modT_mult_matrix_modMultMatrixModMultMatrixModmult_matrix_mod (Operator)

mult_matrix_modT_mult_matrix_modMultMatrixModMultMatrixModmult_matrix_mod — Multiply two matrices.

Signature

mult_matrix_mod( : : MatrixAID, MatrixBID, MultType : )

Herror T_mult_matrix_mod(const Htuple MatrixAID, const Htuple MatrixBID, const Htuple MultType)

void MultMatrixMod(const HTuple& MatrixAID, const HTuple& MatrixBID, const HTuple& MultType)

void HMatrix::MultMatrixMod(const HMatrix& MatrixBID, const HString& MultType) const

void HMatrix::MultMatrixMod(const HMatrix& MatrixBID, const char* MultType) const

void HMatrix::MultMatrixMod(const HMatrix& MatrixBID, const wchar_t* MultType) const   ( Windows only)

static void HOperatorSet.MultMatrixMod(HTuple matrixAID, HTuple matrixBID, HTuple multType)

void HMatrix.MultMatrixMod(HMatrix matrixBID, string multType)

def mult_matrix_mod(matrix_aid: HHandle, matrix_bid: HHandle, mult_type: str) -> None

Description

The operator mult_matrixmult_matrixMultMatrixMultMatrixmult_matrix computes the product of the input matrices MatrixA and MatrixB defined by the matrix handles MatrixAIDMatrixAIDMatrixAIDmatrixAIDmatrix_aid and MatrixBIDMatrixBIDMatrixBIDmatrixBIDmatrix_bid. The input matrix MatrixA is overwritten with the result. Access to the elements of the matrix is possible e.g., with the operator get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixget_full_matrix. If desired, one or both input matrices will be transposed for the multiplication.

The type of multiplication can be selected via MultTypeMultTypeMultTypemultTypemult_type:

'AB'"AB""AB""AB""AB":

The matrices MatrixA and MatrixB will not be transposed. Therefore, the formula for the calculation of the result is:

The number of columns of the matrix MatrixA must be identical to the number of rows of the matrix MatrixB.

Example:

'ATB'"ATB""ATB""ATB""ATB":

The matrix MatrixA will be transposed. The matrix MatrixB will not be transposed. Therefore, the formula for the calculation of the result is:

The number of rows of the matrix MatrixA must be identical to the number of rows of the matrix MatrixB.

Example:

'ABT'"ABT""ABT""ABT""ABT":

The matrix MatrixA will not be transposed. The matrix MatrixB will be transposed. Therefore, the formula for the calculation of the result is:

The number of columns of the matrix MatrixA must be identical to the number of columns of the matrix MatrixB.

Example:

'ATBT'"ATBT""ATBT""ATBT""ATBT":

The matrix MatrixA and the matrix MatrixB will be transposed. Therefore, the formula for the calculation of the result is:

The number of rows of the matrix MatrixA must be identical to the number of columns of the matrix MatrixB.

Example:

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

This operator modifies the state of the following input parameter:

During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.

Parameters

MatrixAIDMatrixAIDMatrixAIDmatrixAIDmatrix_aid (input_control, state is modified)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle of the input matrix A.

MatrixBIDMatrixBIDMatrixBIDmatrixBIDmatrix_bid (input_control)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle of the input matrix B.

MultTypeMultTypeMultTypemultTypemult_type (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Type of the input matrices.

Default: 'AB' "AB" "AB" "AB" "AB"

List of values: 'AB'"AB""AB""AB""AB", 'ABT'"ABT""ABT""ABT""ABT", 'ATB'"ATB""ATB""ATB""ATB", 'ATBT'"ATBT""ATBT""ATBT""ATBT"

Result

If the parameters are valid, the operator mult_matrix_modmult_matrix_modMultMatrixModMultMatrixModmult_matrix_mod returns the value 2 ( H_MSG_TRUE) . If necessary, an exception is raised.

Possible Predecessors

create_matrixcreate_matrixCreateMatrixCreateMatrixcreate_matrix

Possible Successors

get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixget_full_matrix, get_value_matrixget_value_matrixGetValueMatrixGetValueMatrixget_value_matrix

Alternatives

mult_matrixmult_matrixMultMatrixMultMatrixmult_matrix

See also

mult_element_matrixmult_element_matrixMultElementMatrixMultElementMatrixmult_element_matrix, mult_element_matrix_modmult_element_matrix_modMultElementMatrixModMultElementMatrixModmult_element_matrix_mod, div_element_matrixdiv_element_matrixDivElementMatrixDivElementMatrixdiv_element_matrix, div_element_matrix_moddiv_element_matrix_modDivElementMatrixModDivElementMatrixModdiv_element_matrix_mod, transpose_matrixtranspose_matrixTransposeMatrixTransposeMatrixtranspose_matrix, transpose_matrix_modtranspose_matrix_modTransposeMatrixModTransposeMatrixModtranspose_matrix_mod

References

David Poole: “Linear Algebra: A Modern Introduction”; Thomson; Belmont; 2006.
Gene H. Golub, Charles F. van Loan: “Matrix Computations”; The Johns Hopkins University Press; Baltimore and London; 1996.

Module

Foundation