mult_matrixT_mult_matrixMultMatrixMultMatrixmult_matrix (算子)

名称

mult_matrixT_mult_matrixMultMatrixMultMatrixmult_matrix — 将两个矩阵相乘。

签名

mult_matrix( : : MatrixAID, MatrixBID, MultType : MatrixMultID)

Herror T_mult_matrix(const Htuple MatrixAID, const Htuple MatrixBID, const Htuple MultType, Htuple* MatrixMultID)

void MultMatrix(const HTuple& MatrixAID, const HTuple& MatrixBID, const HTuple& MultType, HTuple* MatrixMultID)

HMatrix HMatrix::MultMatrix(const HMatrix& MatrixBID, const HString& MultType) const

HMatrix HMatrix::MultMatrix(const HMatrix& MatrixBID, const char* MultType) const

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

static void HOperatorSet.MultMatrix(HTuple matrixAID, HTuple matrixBID, HTuple multType, out HTuple matrixMultID)

HMatrix HMatrix.MultMatrix(HMatrix matrixBID, string multType)

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

描述

算子 mult_matrixmult_matrixMultMatrixMultMatrixMultMatrixmult_matrix computes the product of the input matrices MatrixA and MatrixB defined by the matrix handles MatrixAIDMatrixAIDMatrixAIDMatrixAIDmatrixAIDmatrix_aid and MatrixBIDMatrixBIDMatrixBIDMatrixBIDmatrixBIDmatrix_bid. A new matrix MatrixMult is generated with the result. The operator returns the matrix handle MatrixMultIDMatrixMultIDMatrixMultIDMatrixMultIDmatrixMultIDmatrix_mult_id of the matrix MatrixMult.可通过算子 get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrixget_full_matrix 等方式访问该矩阵的元素。If desired, one or both input matrices will be transposed for the multiplication.

The type of multiplication can be selected via MultTypeMultTypeMultTypeMultTypemultTypemult_type:

'AB'"AB""AB""AB""AB""AB"

The matrices MatrixA and MatrixB will not be transposed. Therefore, 结果的计算公式为:

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

示例:

'ATB'"ATB""ATB""ATB""ATB""ATB"

The matrix MatrixA will be transposed. The matrix MatrixB will not be transposed. Therefore, 结果的计算公式为:

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

示例:

'ABT'"ABT""ABT""ABT""ABT""ABT"

The matrix MatrixA will not be transposed. The matrix MatrixB will be transposed. Therefore, 结果的计算公式为:

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

示例:

'ATBT'"ATBT""ATBT""ATBT""ATBT""ATBT"

The matrix MatrixA and the matrix MatrixB will be transposed. Therefore, 结果的计算公式为:

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

示例:

执行信息

参数

MatrixAIDMatrixAIDMatrixAIDMatrixAIDmatrixAIDmatrix_aid (输入控制)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle of the input matrix A.

MatrixBIDMatrixBIDMatrixBIDMatrixBIDmatrixBIDmatrix_bid (输入控制)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle of the input matrix B.

MultTypeMultTypeMultTypeMultTypemultTypemult_type (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Type of the input matrices.

默认值: 'AB' "AB" "AB" "AB" "AB" "AB"

值列表: 'AB'"AB""AB""AB""AB""AB", 'ABT'"ABT""ABT""ABT""ABT""ABT", 'ATB'"ATB""ATB""ATB""ATB""ATB", 'ATBT'"ATBT""ATBT""ATBT""ATBT""ATBT"

MatrixMultIDMatrixMultIDMatrixMultIDMatrixMultIDmatrixMultIDmatrix_mult_id (输出控制)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle of the multiplied matrices.

结果

如果参数有效,算子 mult_matrixmult_matrixMultMatrixMultMatrixMultMatrixmult_matrix 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。

可能的前趋

create_matrixcreate_matrixCreateMatrixCreateMatrixCreateMatrixcreate_matrix

可能的后继

get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrixget_full_matrix, get_value_matrixget_value_matrixGetValueMatrixGetValueMatrixGetValueMatrixget_value_matrix

替代

mult_matrix_modmult_matrix_modMultMatrixModMultMatrixModMultMatrixModmult_matrix_mod

另见

mult_element_matrixmult_element_matrixMultElementMatrixMultElementMatrixMultElementMatrixmult_element_matrix, mult_element_matrix_modmult_element_matrix_modMultElementMatrixModMultElementMatrixModMultElementMatrixModmult_element_matrix_mod, div_element_matrixdiv_element_matrixDivElementMatrixDivElementMatrixDivElementMatrixdiv_element_matrix, div_element_matrix_moddiv_element_matrix_modDivElementMatrixModDivElementMatrixModDivElementMatrixModdiv_element_matrix_mod, transpose_matrixtranspose_matrixTransposeMatrixTransposeMatrixTransposeMatrixtranspose_matrix, transpose_matrix_modtranspose_matrix_modTransposeMatrixModTransposeMatrixModTransposeMatrixModtranspose_matrix_mod

参考文献

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.

模块

基础