WPILibC++ 2023.4.3
Eigen::MatrixPower< MatrixType > Class Template Reference

Class for computing matrix powers. More...

#include </home/runner/work/allwpilib/allwpilib/wpimath/src/main/native/thirdparty/eigen/include/unsupported/Eigen/src/MatrixFunctions/MatrixPower.h>

Inheritance diagram for Eigen::MatrixPower< MatrixType >:
Eigen::internal::noncopyable

Public Member Functions

 MatrixPower (const MatrixType &A)
 Constructor. More...
 
const MatrixPowerParenthesesReturnValue< MatrixType > operator() (RealScalar p)
 Returns the matrix power. More...
 
template<typename ResultType >
void compute (ResultType &res, RealScalar p)
 Compute the matrix power. More...
 
Index rows () const
 
Index cols () const
 

Detailed Description

template<typename MatrixType>
class Eigen::MatrixPower< MatrixType >

Class for computing matrix powers.

Template Parameters
MatrixTypetype of the base, expected to be an instantiation of the Matrix class template.

This class is capable of computing real/complex matrices raised to an arbitrary real power. Meanwhile, it saves the result of Schur decomposition if an non-integral power has even been calculated. Therefore, if you want to compute multiple (>= 2) matrix powers for the same matrix, using the class directly is more efficient than calling MatrixBase::pow().

Example:

Output:

 

Constructor & Destructor Documentation

◆ MatrixPower()

template<typename MatrixType >
Eigen::MatrixPower< MatrixType >::MatrixPower ( const MatrixType &  A)
inlineexplicit

Constructor.

Parameters
[in]Athe base of the matrix power.

The class stores a reference to A, so it should not be changed (or destroyed) before evaluation.

Member Function Documentation

◆ cols()

template<typename MatrixType >
Index Eigen::MatrixPower< MatrixType >::cols ( ) const
inline

◆ compute()

template<typename MatrixType >
template<typename ResultType >
void Eigen::MatrixPower< MatrixType >::compute ( ResultType &  res,
RealScalar  p 
)

Compute the matrix power.

Parameters
[in]pexponent, a real scalar.
[out]res\( A^p \) where A is specified in the constructor.

◆ operator()()

template<typename MatrixType >
const MatrixPowerParenthesesReturnValue< MatrixType > Eigen::MatrixPower< MatrixType >::operator() ( RealScalar  p)
inline

Returns the matrix power.

Parameters
[in]pexponent, a real scalar.
Returns
The expression \( A^p \), where A is specified in the constructor.

◆ rows()

template<typename MatrixType >
Index Eigen::MatrixPower< MatrixType >::rows ( ) const
inline

The documentation for this class was generated from the following file: