WPILibC++ 2024.3.2
|
Class for computing matrix powers. More...
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 |
Class for computing matrix powers.
MatrixType | type 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:
|
inlineexplicit |
Constructor.
[in] | A | the base of the matrix power. |
The class stores a reference to A, so it should not be changed (or destroyed) before evaluation.
|
inline |
void Eigen::MatrixPower< MatrixType >::compute | ( | ResultType & | res, |
RealScalar | p | ||
) |
Compute the matrix power.
[in] | p | exponent, a real scalar. |
[out] | res | \( A^p \) where A is specified in the constructor. |
|
inline |
Returns the matrix power.
[in] | p | exponent, a real scalar. |
|
inline |