Skip to content

pow_matrixPowMatrixPowMatrixpow_matrixT_pow_matrix🔗

Short description🔗

pow_matrixPowMatrixPowMatrixpow_matrixT_pow_matrix — Compute the power functions of a matrix.

Signature🔗

pow_matrix( matrix MatrixID, string MatrixType, number Power, out matrix MatrixPowID )void PowMatrix( const HTuple& MatrixID, const HTuple& MatrixType, const HTuple& Power, HTuple* MatrixPowID )static void HOperatorSet.PowMatrix( HTuple matrixID, HTuple matrixType, HTuple power, out HTuple matrixPowID )def pow_matrix( matrix_id: HHandle, matrix_type: str, power: Union[int, float] ) -> HHandle

Herror T_pow_matrix( const Htuple MatrixID, const Htuple MatrixType, const Htuple Power, Htuple* MatrixPowID )

HMatrix HMatrix::PowMatrix( const HString& MatrixType, const HTuple& Power ) const

HMatrix HMatrix::PowMatrix( const HString& MatrixType, double Power ) const

HMatrix HMatrix::PowMatrix( const char* MatrixType, double Power ) const

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

HMatrix HMatrix.PowMatrix( string matrixType, HTuple power )

HMatrix HMatrix.PowMatrix( string matrixType, double power )

Description🔗

The operator pow_matrixPowMatrix 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. A new matrix MatrixPow is generated with the result. The operator returns the matrix handle MatrixPowIDmatrixPowIDmatrix_pow_id of the matrix MatrixPow. 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{MatrixPow} \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{MatrixPow} = \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.

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.

Parameters🔗

MatrixIDmatrixIDmatrix_id (input_control) 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

MatrixPowIDmatrixPowIDmatrix_pow_id (output_control) matrix → (handle)HTuple (HHandle)HMatrix, HTuple (IntPtr)HHandleHtuple (handle)

Matrix handle with the raised powered matrix.

Result🔗

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

See also

sqrt_matrixSqrtMatrix, sqrt_matrix_modSqrtMatrixMod

Module🔗

Foundation