pow_scalar_element_matrix_modT_pow_scalar_element_matrix_modPowScalarElementMatrixModPowScalarElementMatrixModpow_scalar_element_matrix_mod (算子)

名称

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

签名

pow_scalar_element_matrix_mod( : : MatrixID, Power : )

Herror T_pow_scalar_element_matrix_mod(const Htuple MatrixID, const Htuple Power)

void PowScalarElementMatrixMod(const HTuple& MatrixID, const HTuple& Power)

void HMatrix::PowScalarElementMatrixMod(const HTuple& Power) const

void HMatrix::PowScalarElementMatrixMod(double Power) const

static void HOperatorSet.PowScalarElementMatrixMod(HTuple matrixID, HTuple power)

void HMatrix.PowScalarElementMatrixMod(HTuple power)

void HMatrix.PowScalarElementMatrixMod(double power)

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

描述

算子 pow_scalar_element_matrix_modpow_scalar_element_matrix_modPowScalarElementMatrixModPowScalarElementMatrixModPowScalarElementMatrixModpow_scalar_element_matrix_mod 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 is given by the parameter PowerPowerPowerPowerpowerpower. The input matrix is overwritten with the result.可通过算子 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

结果

如果参数有效,算子 pow_scalar_element_matrix_modpow_scalar_element_matrix_modPowScalarElementMatrixModPowScalarElementMatrixModPowScalarElementMatrixModpow_scalar_element_matrix_mod 返回值 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_matrixpow_scalar_element_matrixPowScalarElementMatrixPowScalarElementMatrixPowScalarElementMatrixpow_scalar_element_matrix, 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

模块

基础