|
TR-mbed 1.0
|
Class for computing matrix powers. More...
#include <MatrixPower.h>
Public Member Functions | |
| MatrixPower (const MatrixType &A) | |
| Constructor. | |
| const MatrixPowerParenthesesReturnValue< MatrixType > | operator() (RealScalar p) |
| Returns the matrix power. | |
| template<typename ResultType > | |
| void | compute (ResultType &res, RealScalar p) |
| Compute the matrix power. | |
| 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 | ![]() |
|
inline |
Returns the matrix power.
| [in] | p | exponent, a real scalar. |

|
inline |