Operator Reference
mult_matrix_mod (Operator)
mult_matrix_mod
— Multiply two matrices.
Signature
Description
The operator mult_matrix
computes the product of the input
matrices MatrixA
and MatrixB
defined by the
matrix handles MatrixAID
and MatrixBID
. 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_matrix
. If desired, one or both input
matrices will be transposed for the multiplication.
The type of multiplication can be selected via MultType
:
- 'AB' :
-
The matrices
MatrixA
andMatrixB
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 matrixMatrixB
.Example:
- 'ATB' :
-
The matrix
MatrixA
will be transposed. The matrixMatrixB
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 matrixMatrixB
.Example:
- 'ABT' :
-
The matrix
MatrixA
will not be transposed. The matrixMatrixB
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 matrixMatrixB
.Example:
- 'ATBT' :
-
The matrix
MatrixA
and the matrixMatrixB
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 matrixMatrixB
.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
MatrixAID
(input_control, state is modified) matrix →
(handle)
Matrix handle of the input matrix A.
MatrixBID
(input_control) matrix →
(handle)
Matrix handle of the input matrix B.
MultType
(input_control) string →
(string)
Type of the input matrices.
Default: 'AB'
List of values: 'AB' , 'ABT' , 'ATB' , 'ATBT'
Result
If the parameters are valid, the operator mult_matrix_mod
returns the value 2 (
H_MSG_TRUE)
. If necessary, an exception is raised.
Possible Predecessors
Possible Successors
get_full_matrix
,
get_value_matrix
Alternatives
See also
mult_element_matrix
,
mult_element_matrix_mod
,
div_element_matrix
,
div_element_matrix_mod
,
transpose_matrix
,
transpose_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