Skip to content

pow_matrix_modPowMatrixModPowMatrixModpow_matrix_modT_pow_matrix_mod🔗

Short description🔗

pow_matrix_modPowMatrixModPowMatrixModpow_matrix_modT_pow_matrix_mod — Compute the power functions of a matrix.

Signature🔗

pow_matrix_mod( matrix MatrixID, string MatrixType, number Power )void PowMatrixMod( const HTuple& MatrixID, const HTuple& MatrixType, const HTuple& Power )static void HOperatorSet.PowMatrixMod( HTuple matrixID, HTuple matrixType, HTuple power )def pow_matrix_mod( matrix_id: HHandle, matrix_type: str, power: Union[int, float] ) -> None

Herror T_pow_matrix_mod( const Htuple MatrixID, const Htuple MatrixType, const Htuple Power )

void HMatrix::PowMatrixMod( const HString& MatrixType, const HTuple& Power ) const

void HMatrix::PowMatrixMod( const HString& MatrixType, double Power ) const

void HMatrix::PowMatrixMod( const char* MatrixType, double Power ) const

void HMatrix::PowMatrixMod( const wchar_t* MatrixType, double Power ) const (Windows only)

void HMatrix.PowMatrixMod( string matrixType, HTuple power )

void HMatrix.PowMatrixMod( string matrixType, double power )

Description🔗

The operator pow_matrix_modPowMatrixMod computes the power of the input Matrix by a constant value. The input Matrix is given by the matrix handle MatrixIDmatrixIDmatrix_id. The power value is given by the parameter Powerpowerpower. 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 type of the Matrix can be selected via MatrixTypematrixTypematrix_type. The following values are supported: 'general'"general" for general, 'symmetric'"symmetric" for symmetric, 'positive_definite'"positive_definite" for symmetric positive definite, 'upper_triangular'"upper_triangular" for upper triangular, 'permuted_upper_triangular'"permuted_upper_triangular" for permuted upper triangular, 'lower_triangular'"lower_triangular" for lower triangular, and 'permuted_lower_triangular'"permuted_lower_triangular" for permuted lower triangular matrices. The formula for the calculation of the result is:

\[\begin{eqnarray*} \texttt{Matrix} \quad = \quad {\texttt{Matrix}}^{\textrm{Power}}. \end{eqnarray*}\]

Example:

Powerpowerpower = [2.0][2.0], MatrixTypematrixTypematrix_type = 'general'"general"

\[\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] \end{eqnarray*}\]
\[\begin{eqnarray*} \to \qquad \texttt{Matrix} = \left[ \begin{array}{rrr} 32.0 & 18.0 & 10.0 \\ 68.0 & 62.0 & 26.0 \\ 56.0 & 41.0 & 27.0 \end{array} \right] \end{eqnarray*}\]

Attention🔗

For MatrixTypematrixTypematrix_type = 'symmetric'"symmetric", 'positive_definite'"positive_definite", or 'upper_triangular'"upper_triangular" the upper triangular part of the input Matrix must contain the relevant information of the matrix. The strictly lower triangular part of the matrix is not referenced. For MatrixTypematrixTypematrix_type = 'lower_triangular'"lower_triangular" the lower triangular part of the input Matrix must contain the relevant information of the matrix. The strictly upper triangular part of the matrix is not referenced. If the referenced part of the input Matrix is not of the specified type, an exception is raised.

pow_matrix_modPowMatrixMod modifies the content of an already existing matrix.

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.

MatrixTypematrixTypematrix_type (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

The type of the input matrix.

Default: 'general'"general"
List of values: 'general', 'lower_triangular', 'permuted_lower_triangular', 'permuted_upper_triangular', 'positive_definite', 'symmetric', 'upper_triangular'"general", "lower_triangular", "permuted_lower_triangular", "permuted_upper_triangular", "positive_definite", "symmetric", "upper_triangular"

Powerpowerpower (input_control) number → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

The power.

Default: 2.02.0
Suggested values: 0.1, 0.2, 0.3, 0.5, 0.7, 1.0, 1.5, 2.0, 3.0, 5.0, 10.00.1, 0.2, 0.3, 0.5, 0.7, 1.0, 1.5, 2.0, 3.0, 5.0, 10.0

Result🔗

If the parameters are valid, the operator pow_matrix_modPowMatrixMod 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_matrixPowMatrix, eigenvalues_symmetric_matrixEigenvaluesSymmetricMatrix, eigenvalues_general_matrixEigenvaluesGeneralMatrix

See also

sqrt_matrixSqrtMatrix, sqrt_matrix_modSqrtMatrixMod

Module🔗

Foundation