Class for computing the matrix exponential. More...
#include <MatrixExponential.h>
Public Member Functions | |
template<typename ResultType > | |
void | compute (ResultType &result) |
Computes the matrix exponential. | |
MatrixExponential (const MatrixType &M) | |
Constructor. | |
Private Types | |
typedef NumTraits< Scalar >::Real | RealScalar |
typedef internal::traits < MatrixType >::Scalar | Scalar |
Private Member Functions | |
void | computeUV (float) |
Compute Padé approximant to the exponential. | |
void | computeUV (double) |
Compute Padé approximant to the exponential. | |
MatrixExponential (const MatrixExponential &) | |
MatrixExponential & | operator= (const MatrixExponential &) |
void | pade13 (const MatrixType &A) |
Compute the (13,13)-Padé approximant to the exponential. | |
void | pade3 (const MatrixType &A) |
Compute the (3,3)-Padé approximant to the exponential. | |
void | pade5 (const MatrixType &A) |
Compute the (5,5)-Padé approximant to the exponential. | |
void | pade7 (const MatrixType &A) |
Compute the (7,7)-Padé approximant to the exponential. | |
void | pade9 (const MatrixType &A) |
Compute the (9,9)-Padé approximant to the exponential. | |
Private Attributes | |
MatrixType | m_Id |
Identity matrix of the same size as m_M . | |
float | m_l1norm |
L1 norm of m_M. | |
internal::nested< MatrixType > ::type | m_M |
Reference to matrix whose exponential is to be computed. | |
int | m_squarings |
Number of squarings required in the last step. | |
MatrixType | m_tmp1 |
Used for temporary storage. | |
MatrixType | m_tmp2 |
Used for temporary storage. | |
MatrixType | m_U |
Even-degree terms in numerator of Padé approximant. | |
MatrixType | m_V |
Odd-degree terms in numerator of Padé approximant. |
Class for computing the matrix exponential.
MatrixType | type of the argument of the exponential, expected to be an instantiation of the Matrix class template. |
Definition at line 39 of file MatrixExponential.h.
typedef NumTraits<Scalar>::Real MatrixExponential< MatrixType >::RealScalar [private] |
Definition at line 132 of file MatrixExponential.h.
typedef internal::traits<MatrixType>::Scalar MatrixExponential< MatrixType >::Scalar [private] |
Definition at line 131 of file MatrixExponential.h.
MatrixExponential< MatrixType >::MatrixExponential | ( | const MatrixType & | M | ) | [inline] |
Constructor.
The class stores a reference to M
, so it should not be changed (or destroyed) before compute() is called.
[in] | M | matrix whose exponential is to be computed. |
Definition at line 160 of file MatrixExponential.h.
MatrixExponential< MatrixType >::MatrixExponential | ( | const MatrixExponential< MatrixType > & | ) | [private] |
void MatrixExponential< MatrixType >::compute | ( | ResultType & | result | ) | [inline] |
Computes the matrix exponential.
[out] | result | the matrix exponential of M in the constructor. |
Definition at line 175 of file MatrixExponential.h.
void MatrixExponential< MatrixType >::computeUV | ( | float | ) | [inline, private] |
Compute Padé approximant to the exponential.
Definition at line 251 of file MatrixExponential.h.
void MatrixExponential< MatrixType >::computeUV | ( | double | ) | [inline, private] |
Compute Padé approximant to the exponential.
Computes m_U
, m_V
and m_squarings
such that is a Padé of around . The degree of the Padé approximant and the value of squarings are chosen such that the approximation error is no more than the round-off error.
The argument of this function should correspond with the (real part of) the entries of m_M
. It is used to select the correct implementation using overloading.
Definition at line 266 of file MatrixExponential.h.
MatrixExponential& MatrixExponential< MatrixType >::operator= | ( | const MatrixExponential< MatrixType > & | ) | [private] |
EIGEN_STRONG_INLINE void MatrixExponential< MatrixType >::pade13 | ( | const MatrixType & | A | ) | [inline, private] |
Compute the (13,13)-Padé approximant to the exponential.
After exit, is the Padé approximant of around .
[in] | A | Argument of matrix exponential |
Definition at line 233 of file MatrixExponential.h.
EIGEN_STRONG_INLINE void MatrixExponential< MatrixType >::pade3 | ( | const MatrixType & | A | ) | [inline, private] |
Compute the (3,3)-Padé approximant to the exponential.
After exit, is the Padé approximant of around .
[in] | A | Argument of matrix exponential |
Definition at line 186 of file MatrixExponential.h.
EIGEN_STRONG_INLINE void MatrixExponential< MatrixType >::pade5 | ( | const MatrixType & | A | ) | [inline, private] |
Compute the (5,5)-Padé approximant to the exponential.
After exit, is the Padé approximant of around .
[in] | A | Argument of matrix exponential |
Definition at line 196 of file MatrixExponential.h.
EIGEN_STRONG_INLINE void MatrixExponential< MatrixType >::pade7 | ( | const MatrixType & | A | ) | [inline, private] |
Compute the (7,7)-Padé approximant to the exponential.
After exit, is the Padé approximant of around .
[in] | A | Argument of matrix exponential |
Definition at line 207 of file MatrixExponential.h.
EIGEN_STRONG_INLINE void MatrixExponential< MatrixType >::pade9 | ( | const MatrixType & | A | ) | [inline, private] |
Compute the (9,9)-Padé approximant to the exponential.
After exit, is the Padé approximant of around .
[in] | A | Argument of matrix exponential |
Definition at line 219 of file MatrixExponential.h.
MatrixType MatrixExponential< MatrixType >::m_Id [private] |
Identity matrix of the same size as m_M
.
Definition at line 150 of file MatrixExponential.h.
float MatrixExponential< MatrixType >::m_l1norm [private] |
L1 norm of m_M.
Definition at line 156 of file MatrixExponential.h.
internal::nested<MatrixType>::type MatrixExponential< MatrixType >::m_M [private] |
Reference to matrix whose exponential is to be computed.
Definition at line 135 of file MatrixExponential.h.
int MatrixExponential< MatrixType >::m_squarings [private] |
Number of squarings required in the last step.
Definition at line 153 of file MatrixExponential.h.
MatrixType MatrixExponential< MatrixType >::m_tmp1 [private] |
Used for temporary storage.
Definition at line 144 of file MatrixExponential.h.
MatrixType MatrixExponential< MatrixType >::m_tmp2 [private] |
Used for temporary storage.
Definition at line 147 of file MatrixExponential.h.
MatrixType MatrixExponential< MatrixType >::m_U [private] |
Even-degree terms in numerator of Padé approximant.
Definition at line 138 of file MatrixExponential.h.
MatrixType MatrixExponential< MatrixType >::m_V [private] |
Odd-degree terms in numerator of Padé approximant.
Definition at line 141 of file MatrixExponential.h.