pow_scalar_element_matrixpow_scalar_element_matrixPowScalarElementMatrixPowScalarElementMatrixpow_scalar_element_matrixT_pow_scalar_element_matrix
Short description
pow_scalar_element_matrixpow_scalar_element_matrixPowScalarElementMatrixPowScalarElementMatrixpow_scalar_element_matrixT_pow_scalar_element_matrix — Compute the power functions of the elements of a matrix.
Signature
pow_scalar_element_matrix( matrix MatrixID, number Power, out matrix MatrixPowID )pow_scalar_element_matrix( : : MatrixID, Power : MatrixPowID )void PowScalarElementMatrix( const HTuple& MatrixID, const HTuple& Power, HTuple* MatrixPowID )static void HOperatorSet.PowScalarElementMatrix( HTuple matrixID, HTuple power, out HTuple matrixPowID )def pow_scalar_element_matrix( matrix_id: HHandle, power: Union[int, float] ) -> HHandle
Herror T_pow_scalar_element_matrix( const Htuple MatrixID, const Htuple Power, Htuple* MatrixPowID )
HMatrix HMatrix::PowScalarElementMatrix( const HTuple& Power ) const
HMatrix HMatrix::PowScalarElementMatrix( double Power ) const
HMatrix HMatrix.PowScalarElementMatrix( HTuple power )
HMatrix HMatrix.PowScalarElementMatrix( double power )
Description
The operator pow_scalar_element_matrixPowScalarElementMatrix computes the power of all
elements of the input Matrix by a constant value. The
input Matrix is given by the matrix handle
MatrixIDmatrixIDmatrix_id. The power value Power 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 formula for the calculation of the
result is:
\[\begin{eqnarray*}
\texttt{MatrixPow}_{ij} \quad = \quad
{\texttt{Matrix}_{ij}}^{\textrm{Power}}.
\end{eqnarray*}\]
Example:
Powerpowerpower = [2.0][2.0]
\[\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}
9.0 & 1.0 & 4.0 \\
25.0 & 49.0 & 4.0 \\
81.0 & 16.0 & 1.0
\end{array} \right]
\end{eqnarray*}\]
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)(handle)HTuple (HHandle)HMatrix, HTuple (IntPtr)HHandleHtuple (handle)
Matrix handle of the input matrix.
Powerpowerpower (input_control) number → (real / integer)(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)(handle)HTuple (HHandle)HMatrix, HTuple (IntPtr)HHandleHtuple (handle)
Matrix handle with the raised power of the input
matrix.
Result
If the parameters are valid, the operator
pow_scalar_element_matrixPowScalarElementMatrix 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_scalar_element_matrix_modPowScalarElementMatrixMod, pow_element_matrixPowElementMatrix, pow_element_matrix_modPowElementMatrixMod
See also
sqrt_matrixSqrtMatrix, sqrt_matrix_modSqrtMatrixMod
Module
Foundation