pow_scalar_element_matrixT_pow_scalar_element_matrixPowScalarElementMatrixPowScalarElementMatrixpow_scalar_element_matrix (算子)

名称

pow_scalar_element_matrixT_pow_scalar_element_matrixPowScalarElementMatrixPowScalarElementMatrixpow_scalar_element_matrix — 计算矩阵元素的幂函数。

签名

pow_scalar_element_matrix( : : MatrixID, Power : MatrixPowID)

Herror T_pow_scalar_element_matrix(const Htuple MatrixID, const Htuple Power, Htuple* MatrixPowID)

void PowScalarElementMatrix(const HTuple& MatrixID, const HTuple& Power, HTuple* MatrixPowID)

HMatrix HMatrix::PowScalarElementMatrix(const HTuple& Power) const

HMatrix HMatrix::PowScalarElementMatrix(double Power) const

static void HOperatorSet.PowScalarElementMatrix(HTuple matrixID, HTuple power, out HTuple matrixPowID)

HMatrix HMatrix.PowScalarElementMatrix(HTuple power)

HMatrix HMatrix.PowScalarElementMatrix(double power)

def pow_scalar_element_matrix(matrix_id: HHandle, power: Union[int, float]) -> HHandle

描述

算子 pow_scalar_element_matrixpow_scalar_element_matrixPowScalarElementMatrixPowScalarElementMatrixPowScalarElementMatrixpow_scalar_element_matrix computes the power of all elements of the input Matrix by a constant value. The input Matrix is given by the matrix handle MatrixIDMatrixIDMatrixIDMatrixIDmatrixIDmatrix_id. The power value Power is given by the parameter PowerPowerPowerPowerpowerpower. A new matrix MatrixPow is generated with the result. The operator returns the matrix handle MatrixPowIDMatrixPowIDMatrixPowIDMatrixPowIDmatrixPowIDmatrix_pow_id of the matrix MatrixPow.可通过算子 get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrixget_full_matrix 等方式访问该矩阵的元素。结果的计算公式为:

示例:

PowerPowerPowerPowerpowerpower = [2.0]

执行信息

参数

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

输入矩阵的矩阵句柄。

PowerPowerPowerPowerpowerpower (输入控制)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

The power.

默认值: 2.0

建议值: 0.1, 0.2, 0.3, 0.5, 0.7, 1.0, 1.5, 2.0, 3.0, 5.0, 10.0

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

Matrix handle with the raised power of the input matrix.

结果

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

可能的前趋

create_matrixcreate_matrixCreateMatrixCreateMatrixCreateMatrixcreate_matrix

可能的后继

get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrixget_full_matrix, get_value_matrixget_value_matrixGetValueMatrixGetValueMatrixGetValueMatrixget_value_matrix

替代

pow_scalar_element_matrix_modpow_scalar_element_matrix_modPowScalarElementMatrixModPowScalarElementMatrixModPowScalarElementMatrixModpow_scalar_element_matrix_mod, pow_element_matrixpow_element_matrixPowElementMatrixPowElementMatrixPowElementMatrixpow_element_matrix, pow_element_matrix_modpow_element_matrix_modPowElementMatrixModPowElementMatrixModPowElementMatrixModpow_element_matrix_mod

另见

sqrt_matrixsqrt_matrixSqrtMatrixSqrtMatrixSqrtMatrixsqrt_matrix, sqrt_matrix_modsqrt_matrix_modSqrtMatrixModSqrtMatrixModSqrtMatrixModsqrt_matrix_mod

模块

基础