Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Eigen::MatrixExponential< MatrixType > Class Template Reference

Class for computing the matrix exponential. More...

#include <MatrixExponential.h>

Public Member Functions

template<typename ResultType >
void compute (ResultType &result)
 Computes the matrix exponential. More...
 
 MatrixExponential (const MatrixType &M)
 Constructor. More...
 

Private Types

typedef std::complex< RealScalarComplexScalar
 
typedef NumTraits< Scalar >::Real RealScalar
 
typedef internal::traits< MatrixType >::Scalar Scalar
 

Private Member Functions

void computeUV (double)
 Compute Padé approximant to the exponential. More...
 
void computeUV (float)
 Compute Padé approximant to the exponential. More...
 
void computeUV (long double)
 Compute Padé approximant to the exponential. More...
 
 MatrixExponential (const MatrixExponential &)
 
MatrixExponentialoperator= (const MatrixExponential &)
 
void pade13 (const MatrixType &A)
 Compute the (13,13)-Padé approximant to the exponential. More...
 
void pade17 (const MatrixType &A)
 Compute the (17,17)-Padé approximant to the exponential. More...
 
void pade3 (const MatrixType &A)
 Compute the (3,3)-Padé approximant to the exponential. More...
 
void pade5 (const MatrixType &A)
 Compute the (5,5)-Padé approximant to the exponential. More...
 
void pade7 (const MatrixType &A)
 Compute the (7,7)-Padé approximant to the exponential. More...
 
void pade9 (const MatrixType &A)
 Compute the (9,9)-Padé approximant to the exponential. More...
 

Private Attributes

MatrixType m_Id
 Identity matrix of the same size as m_M. More...
 
RealScalar m_l1norm
 L1 norm of m_M. More...
 
internal::nested< MatrixType >::type m_M
 Reference to matrix whose exponential is to be computed. More...
 
int m_squarings
 Number of squarings required in the last step. More...
 
MatrixType m_tmp1
 Used for temporary storage. More...
 
MatrixType m_tmp2
 Used for temporary storage. More...
 
MatrixType m_U
 Odd-degree terms in numerator of Padé approximant. More...
 
MatrixType m_V
 Even-degree terms in numerator of Padé approximant. More...
 

Detailed Description

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

Class for computing the matrix exponential.

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

Definition at line 24 of file MatrixExponential.h.

Member Typedef Documentation

template<typename MatrixType>
typedef std::complex<RealScalar> Eigen::MatrixExponential< MatrixType >::ComplexScalar
private

Definition at line 135 of file MatrixExponential.h.

template<typename MatrixType>
typedef NumTraits<Scalar>::Real Eigen::MatrixExponential< MatrixType >::RealScalar
private

Definition at line 134 of file MatrixExponential.h.

template<typename MatrixType>
typedef internal::traits<MatrixType>::Scalar Eigen::MatrixExponential< MatrixType >::Scalar
private

Definition at line 133 of file MatrixExponential.h.

Constructor & Destructor Documentation

template<typename MatrixType >
Eigen::MatrixExponential< MatrixType >::MatrixExponential ( const MatrixType &  M)

Constructor.

The class stores a reference to M, so it should not be changed (or destroyed) before compute() is called.

Parameters
[in]Mmatrix whose exponential is to be computed.

Definition at line 163 of file MatrixExponential.h.

template<typename MatrixType>
Eigen::MatrixExponential< MatrixType >::MatrixExponential ( const MatrixExponential< MatrixType > &  )
private

Member Function Documentation

template<typename MatrixType >
template<typename ResultType >
void Eigen::MatrixExponential< MatrixType >::compute ( ResultType &  result)

Computes the matrix exponential.

Parameters
[out]resultthe matrix exponential of M in the constructor.

Definition at line 178 of file MatrixExponential.h.

template<typename MatrixType >
void Eigen::MatrixExponential< MatrixType >::computeUV ( double  )
private

Compute Padé approximant to the exponential.

Computes m_U, m_V and m_squarings such that $ (V+U)(V-U)^{-1} $ is a Padé of $ \exp(2^{-\mbox{squarings}}M) $ around $ M = 0 $. 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 302 of file MatrixExponential.h.

template<typename MatrixType >
void Eigen::MatrixExponential< MatrixType >::computeUV ( float  )
private

Compute Padé approximant to the exponential.

See also
computeUV(double);

Definition at line 284 of file MatrixExponential.h.

template<typename MatrixType >
void Eigen::MatrixExponential< MatrixType >::computeUV ( long  double)
private

Compute Padé approximant to the exponential.

See also
computeUV(double);

Definition at line 324 of file MatrixExponential.h.

template<typename MatrixType>
MatrixExponential& Eigen::MatrixExponential< MatrixType >::operator= ( const MatrixExponential< MatrixType > &  )
private
template<typename MatrixType >
EIGEN_STRONG_INLINE void Eigen::MatrixExponential< MatrixType >::pade13 ( const MatrixType &  A)
private

Compute the (13,13)-Padé approximant to the exponential.

After exit, $ (V+U)(V-U)^{-1} $ is the Padé approximant of $ \exp(A) $ around $ A = 0 $.

Parameters
[in]AArgument of matrix exponential

Definition at line 242 of file MatrixExponential.h.

template<typename MatrixType>
void Eigen::MatrixExponential< MatrixType >::pade17 ( const MatrixType &  A)
private

Compute the (17,17)-Padé approximant to the exponential.

After exit, $ (V+U)(V-U)^{-1} $ is the Padé approximant of $ \exp(A) $ around $ A = 0 $.

This function activates only if your long double is double-double or quadruple.

Parameters
[in]AArgument of matrix exponential
template<typename MatrixType >
EIGEN_STRONG_INLINE void Eigen::MatrixExponential< MatrixType >::pade3 ( const MatrixType &  A)
private

Compute the (3,3)-Padé approximant to the exponential.

After exit, $ (V+U)(V-U)^{-1} $ is the Padé approximant of $ \exp(A) $ around $ A = 0 $.

Parameters
[in]AArgument of matrix exponential

Definition at line 195 of file MatrixExponential.h.

template<typename MatrixType >
EIGEN_STRONG_INLINE void Eigen::MatrixExponential< MatrixType >::pade5 ( const MatrixType &  A)
private

Compute the (5,5)-Padé approximant to the exponential.

After exit, $ (V+U)(V-U)^{-1} $ is the Padé approximant of $ \exp(A) $ around $ A = 0 $.

Parameters
[in]AArgument of matrix exponential

Definition at line 205 of file MatrixExponential.h.

template<typename MatrixType >
EIGEN_STRONG_INLINE void Eigen::MatrixExponential< MatrixType >::pade7 ( const MatrixType &  A)
private

Compute the (7,7)-Padé approximant to the exponential.

After exit, $ (V+U)(V-U)^{-1} $ is the Padé approximant of $ \exp(A) $ around $ A = 0 $.

Parameters
[in]AArgument of matrix exponential

Definition at line 216 of file MatrixExponential.h.

template<typename MatrixType >
EIGEN_STRONG_INLINE void Eigen::MatrixExponential< MatrixType >::pade9 ( const MatrixType &  A)
private

Compute the (9,9)-Padé approximant to the exponential.

After exit, $ (V+U)(V-U)^{-1} $ is the Padé approximant of $ \exp(A) $ around $ A = 0 $.

Parameters
[in]AArgument of matrix exponential

Definition at line 228 of file MatrixExponential.h.

Member Data Documentation

template<typename MatrixType>
MatrixType Eigen::MatrixExponential< MatrixType >::m_Id
private

Identity matrix of the same size as m_M.

Definition at line 153 of file MatrixExponential.h.

template<typename MatrixType>
RealScalar Eigen::MatrixExponential< MatrixType >::m_l1norm
private

L1 norm of m_M.

Definition at line 159 of file MatrixExponential.h.

template<typename MatrixType>
internal::nested<MatrixType>::type Eigen::MatrixExponential< MatrixType >::m_M
private

Reference to matrix whose exponential is to be computed.

Definition at line 138 of file MatrixExponential.h.

template<typename MatrixType>
int Eigen::MatrixExponential< MatrixType >::m_squarings
private

Number of squarings required in the last step.

Definition at line 156 of file MatrixExponential.h.

template<typename MatrixType>
MatrixType Eigen::MatrixExponential< MatrixType >::m_tmp1
private

Used for temporary storage.

Definition at line 147 of file MatrixExponential.h.

template<typename MatrixType>
MatrixType Eigen::MatrixExponential< MatrixType >::m_tmp2
private

Used for temporary storage.

Definition at line 150 of file MatrixExponential.h.

template<typename MatrixType>
MatrixType Eigen::MatrixExponential< MatrixType >::m_U
private

Odd-degree terms in numerator of Padé approximant.

Definition at line 141 of file MatrixExponential.h.

template<typename MatrixType>
MatrixType Eigen::MatrixExponential< MatrixType >::m_V
private

Even-degree terms in numerator of Padé approximant.

Definition at line 144 of file MatrixExponential.h.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:36