Skip to content

pow_element_matrix_modPowElementMatrixModPowElementMatrixModpow_element_matrix_modT_pow_element_matrix_mod🔗

Short description🔗

pow_element_matrix_modPowElementMatrixModPowElementMatrixModpow_element_matrix_modT_pow_element_matrix_mod — Compute the power functions of the elements of a matrix.

Signature🔗

pow_element_matrix_mod( matrix MatrixID, matrix MatrixExpID )void PowElementMatrixMod( const HTuple& MatrixID, const HTuple& MatrixExpID )static void HOperatorSet.PowElementMatrixMod( HTuple matrixID, HTuple matrixExpID )def pow_element_matrix_mod( matrix_id: HHandle, matrix_exp_id: HHandle ) -> None

Herror T_pow_element_matrix_mod( const Htuple MatrixID, const Htuple MatrixExpID )

void HMatrix::PowElementMatrixMod( const HMatrix& MatrixExpID ) const

void HMatrix.PowElementMatrixMod( HMatrix matrixExpID )

Description🔗

The operator pow_element_matrix_modPowElementMatrixMod computes the power of all elements of the input Matrix with the elements of the input matrix MatrixExp. The input matrices Matrix and MatrixExp are defined by the matrix handles MatrixIDmatrixIDmatrix_id and MatrixExpIDmatrixExpIDmatrix_exp_id. Both matrices must have identical dimensions. The input Matrix is overwritten with the result. Access to the elements of the matrix is possible e.g., with the operator get_full_matrixGetFullMatrix. The formula for the calculation of the result is:

\[\begin{eqnarray*} \texttt{Matrix}_{ij} \quad = \quad {\texttt{Matrix}_{ij}} ^{\texttt{MatrixExp}_{ij}}. \end{eqnarray*}\]

Example:

\[\begin{eqnarray*} \texttt{Matrix} = \left[ \begin{array}{rrr} 3.0 & 1.0 & 2.0 \\ 5.0 & 7.0 & 2.0 \\ 9.0 & 4.0 & 1.0 \end{array} \right] \qquad \texttt{MatrixExp} = \left[ \begin{array}{rrr} 1.0 & 2.0 & 2.0 \\ 2.0 & 0.0 & 3.0 \\ 0.5 & 3.0 & 1.0 \end{array} \right] \end{eqnarray*}\]
\[\begin{eqnarray*} \to \qquad \texttt{Matrix} = \left[ \begin{array}{rrr} 3.0 & 1.0 & 4.0 \\ 25.0 & 1.0 & 8.0 \\ 3.0 & 64.0 & 1.0 \end{array} \right] \end{eqnarray*}\]

Execution information🔗

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🔗

MatrixIDmatrixIDmatrix_id (input_control, state is modified) matrix → (handle)HTuple (HHandle)HMatrix, HTuple (IntPtr)HHandleHtuple (handle)

Matrix handle of the input matrix of the base.

MatrixExpIDmatrixExpIDmatrix_exp_id (input_control) matrix → (handle)HTuple (HHandle)HMatrix, HTuple (IntPtr)HHandleHtuple (handle)

Matrix handle of the input matrix with exponents.

Result🔗

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

Combinations with other operators🔗

Combinations

Possible predecessors

create_matrixCreateMatrix

Possible successors

get_full_matrixGetFullMatrix, get_value_matrixGetValueMatrix

Alternatives

pow_element_matrixPowElementMatrix, pow_scalar_element_matrixPowScalarElementMatrix, pow_scalar_element_matrix_modPowScalarElementMatrixMod

See also

sqrt_matrixSqrtMatrix, sqrt_matrix_modSqrtMatrixMod

Module🔗

Foundation