WPILibC++ 2024.3.1
Eigen::internal Namespace Reference

Classes

struct  is_exp_known_type
 
struct  is_exp_known_type< double >
 
struct  is_exp_known_type< float >
 
struct  is_exp_known_type< long double >
 
struct  matrix_exp_computeUV
 Compute the (17,17)-Padé approximant to the exponential. More...
 
struct  matrix_exp_computeUV< MatrixType, double >
 
struct  matrix_exp_computeUV< MatrixType, float >
 
struct  matrix_exp_computeUV< MatrixType, long double >
 
struct  matrix_function_compute
 Class for computing matrix functions. More...
 
struct  matrix_function_compute< MatrixType, 0 >
 
struct  matrix_function_compute< MatrixType, 1 >
 
struct  matrix_log_max_pade_degree
 
struct  matrix_log_min_pade_degree
 
struct  matrix_sqrt_compute
 Helper struct for computing matrix square roots of general matrices. More...
 
struct  matrix_sqrt_compute< MatrixType, 0 >
 
struct  matrix_sqrt_compute< MatrixType, 1 >
 
struct  MatrixExponentialScalingOp
 Scaling operator. More...
 
class  MatrixFunctionAtomic
 Helper class for computing matrix functions of atomic matrices. More...
 
class  MatrixLogarithmAtomic
 Helper class for computing matrix logarithm of atomic matrices. More...
 
struct  traits< MatrixComplexPowerReturnValue< Derived > >
 
struct  traits< MatrixExponentialReturnValue< Derived > >
 
struct  traits< MatrixFunctionReturnValue< Derived > >
 
struct  traits< MatrixLogarithmReturnValue< Derived > >
 
struct  traits< MatrixPowerParenthesesReturnValue< MatrixPowerType > >
 
struct  traits< MatrixPowerReturnValue< Derived > >
 
struct  traits< MatrixSquareRootReturnValue< Derived > >
 

Functions

template<typename MatrixType >
void matrix_log_compute_2x2 (const MatrixType &A, MatrixType &result)
 Compute logarithm of 2x2 triangular matrix. More...
 
int matrix_log_get_pade_degree (float normTminusI)
 
int matrix_log_get_pade_degree (double normTminusI)
 
int matrix_log_get_pade_degree (long double normTminusI)
 
template<typename MatrixType >
void matrix_log_compute_pade (MatrixType &result, const MatrixType &T, int degree)
 
template<typename MatrixType >
void matrix_log_compute_big (const MatrixType &A, MatrixType &result)
 Compute logarithm of triangular matrices with size > 2. More...
 
template<typename Scalar >
Scalar stem_function_exp (Scalar x, int)
 The exponential function (and its derivatives). More...
 
template<typename Scalar >
Scalar stem_function_cos (Scalar x, int n)
 Cosine (and its derivatives). More...
 
template<typename Scalar >
Scalar stem_function_sin (Scalar x, int n)
 Sine (and its derivatives). More...
 
template<typename Scalar >
Scalar stem_function_cosh (Scalar x, int n)
 Hyperbolic cosine (and its derivatives). More...
 
template<typename Scalar >
Scalar stem_function_sinh (Scalar x, int n)
 Hyperbolic sine (and its derivatives). More...
 
template<typename MatrixType >
NumTraits< typenameMatrixType::Scalar >::Real matrix_function_compute_mu (const MatrixType &A)
 
template<typename Index , typename ListOfClusters >
ListOfClusters::iterator matrix_function_find_cluster (Index key, ListOfClusters &clusters)
 Find cluster in clusters containing some value. More...
 
template<typename EivalsType , typename Cluster >
void matrix_function_partition_eigenvalues (const EivalsType &eivals, std::list< Cluster > &clusters)
 Partition eigenvalues in clusters of ei'vals close to each other. More...
 
template<typename ListOfClusters , typename Index >
void matrix_function_compute_cluster_size (const ListOfClusters &clusters, Matrix< Index, Dynamic, 1 > &clusterSize)
 Compute size of each cluster given a partitioning. More...
 
template<typename VectorType >
void matrix_function_compute_block_start (const VectorType &clusterSize, VectorType &blockStart)
 Compute start of each block using clusterSize. More...
 
template<typename EivalsType , typename ListOfClusters , typename VectorType >
void matrix_function_compute_map (const EivalsType &eivals, const ListOfClusters &clusters, VectorType &eivalToCluster)
 Compute mapping of eigenvalue indices to cluster indices. More...
 
template<typename DynVectorType , typename VectorType >
void matrix_function_compute_permutation (const DynVectorType &blockStart, const DynVectorType &eivalToCluster, VectorType &permutation)
 Compute permutation which groups ei'vals in same cluster together. More...
 
template<typename VectorType , typename MatrixType >
void matrix_function_permute_schur (VectorType &permutation, MatrixType &U, MatrixType &T)
 Permute Schur decomposition in U and T according to permutation. More...
 
template<typename MatrixType , typename AtomicType , typename VectorType >
void matrix_function_compute_block_atomic (const MatrixType &T, AtomicType &atomic, const VectorType &blockStart, const VectorType &clusterSize, MatrixType &fT)
 Compute block diagonal part of matrix function. More...
 
template<typename MatrixType >
MatrixType matrix_function_solve_triangular_sylvester (const MatrixType &A, const MatrixType &B, const MatrixType &C)
 Solve a triangular Sylvester equation AX + XB = C. More...
 
template<typename MatrixType , typename VectorType >
void matrix_function_compute_above_diagonal (const MatrixType &T, const VectorType &blockStart, const VectorType &clusterSize, MatrixType &fT)
 Compute part of matrix function above block diagonal. More...
 
template<typename MatrixType , typename ResultType >
void matrix_sqrt_quasi_triangular_2x2_diagonal_block (const MatrixType &T, Index i, ResultType &sqrtT)
 
template<typename MatrixType , typename ResultType >
void matrix_sqrt_quasi_triangular_1x1_off_diagonal_block (const MatrixType &T, Index i, Index j, ResultType &sqrtT)
 
template<typename MatrixType , typename ResultType >
void matrix_sqrt_quasi_triangular_1x2_off_diagonal_block (const MatrixType &T, Index i, Index j, ResultType &sqrtT)
 
template<typename MatrixType , typename ResultType >
void matrix_sqrt_quasi_triangular_2x1_off_diagonal_block (const MatrixType &T, Index i, Index j, ResultType &sqrtT)
 
template<typename MatrixType >
void matrix_sqrt_quasi_triangular_solve_auxiliary_equation (MatrixType &X, const MatrixType &A, const MatrixType &B, const MatrixType &C)
 
template<typename MatrixType , typename ResultType >
void matrix_sqrt_quasi_triangular_2x2_off_diagonal_block (const MatrixType &T, Index i, Index j, ResultType &sqrtT)
 
template<typename MatrixType , typename ResultType >
void matrix_sqrt_quasi_triangular_diagonal (const MatrixType &T, ResultType &sqrtT)
 
template<typename MatrixType , typename ResultType >
void matrix_sqrt_quasi_triangular_off_diagonal (const MatrixType &T, ResultType &sqrtT)
 
template<typename MatA , typename MatU , typename MatV >
void matrix_exp_pade3 (const MatA &A, MatU &U, MatV &V)
 Compute the (3,3)-Padé approximant to the exponential. More...
 
template<typename MatA , typename MatU , typename MatV >
void matrix_exp_pade5 (const MatA &A, MatU &U, MatV &V)
 Compute the (5,5)-Padé approximant to the exponential. More...
 
template<typename MatA , typename MatU , typename MatV >
void matrix_exp_pade7 (const MatA &A, MatU &U, MatV &V)
 Compute the (7,7)-Padé approximant to the exponential. More...
 
template<typename MatA , typename MatU , typename MatV >
void matrix_exp_pade9 (const MatA &A, MatU &U, MatV &V)
 Compute the (9,9)-Padé approximant to the exponential. More...
 
template<typename MatA , typename MatU , typename MatV >
void matrix_exp_pade13 (const MatA &A, MatU &U, MatV &V)
 Compute the (13,13)-Padé approximant to the exponential. More...
 
template<typename ArgType , typename ResultType >
void matrix_exp_compute (const ArgType &arg, ResultType &result, true_type)
 
template<typename ArgType , typename ResultType >
void matrix_exp_compute (const ArgType &arg, ResultType &result, false_type)
 

Variables

static const float matrix_function_separation = 0.1f
 Maximum distance allowed between eigenvalues to be considered "close". More...
 

Function Documentation

◆ matrix_exp_compute() [1/2]

template<typename ArgType , typename ResultType >
void Eigen::internal::matrix_exp_compute ( const ArgType &  arg,
ResultType &  result,
false_type   
)

◆ matrix_exp_compute() [2/2]

template<typename ArgType , typename ResultType >
void Eigen::internal::matrix_exp_compute ( const ArgType &  arg,
ResultType &  result,
true_type   
)

◆ matrix_exp_pade13()

template<typename MatA , typename MatU , typename MatV >
void Eigen::internal::matrix_exp_pade13 ( const MatA &  A,
MatU &  U,
MatV &  V 
)

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 \).

◆ matrix_exp_pade3()

template<typename MatA , typename MatU , typename MatV >
void Eigen::internal::matrix_exp_pade3 ( const MatA &  A,
MatU &  U,
MatV &  V 
)

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 \).

◆ matrix_exp_pade5()

template<typename MatA , typename MatU , typename MatV >
void Eigen::internal::matrix_exp_pade5 ( const MatA &  A,
MatU &  U,
MatV &  V 
)

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 \).

◆ matrix_exp_pade7()

template<typename MatA , typename MatU , typename MatV >
void Eigen::internal::matrix_exp_pade7 ( const MatA &  A,
MatU &  U,
MatV &  V 
)

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 \).

◆ matrix_exp_pade9()

template<typename MatA , typename MatU , typename MatV >
void Eigen::internal::matrix_exp_pade9 ( const MatA &  A,
MatU &  U,
MatV &  V 
)

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 \).

◆ matrix_function_compute_above_diagonal()

template<typename MatrixType , typename VectorType >
void Eigen::internal::matrix_function_compute_above_diagonal ( const MatrixType &  T,
const VectorType &  blockStart,
const VectorType &  clusterSize,
MatrixType &  fT 
)

Compute part of matrix function above block diagonal.

This routine completes the computation of fT, denoting a matrix function applied to the triangular matrix T. It assumes that the block diagonal part of fT has already been computed. The part below the diagonal is zero, because T is upper triangular.

◆ matrix_function_compute_block_atomic()

template<typename MatrixType , typename AtomicType , typename VectorType >
void Eigen::internal::matrix_function_compute_block_atomic ( const MatrixType &  T,
AtomicType &  atomic,
const VectorType &  blockStart,
const VectorType &  clusterSize,
MatrixType &  fT 
)

Compute block diagonal part of matrix function.

This routine computes the matrix function applied to the block diagonal part of T (which should be upper triangular), with the blocking given by blockStart and clusterSize. The matrix function of each diagonal block is computed by atomic. The off-diagonal parts of fT are set to zero.

◆ matrix_function_compute_block_start()

template<typename VectorType >
void Eigen::internal::matrix_function_compute_block_start ( const VectorType &  clusterSize,
VectorType &  blockStart 
)

Compute start of each block using clusterSize.

◆ matrix_function_compute_cluster_size()

template<typename ListOfClusters , typename Index >
void Eigen::internal::matrix_function_compute_cluster_size ( const ListOfClusters &  clusters,
Matrix< Index, Dynamic, 1 > &  clusterSize 
)

Compute size of each cluster given a partitioning.

◆ matrix_function_compute_map()

template<typename EivalsType , typename ListOfClusters , typename VectorType >
void Eigen::internal::matrix_function_compute_map ( const EivalsType &  eivals,
const ListOfClusters &  clusters,
VectorType &  eivalToCluster 
)

Compute mapping of eigenvalue indices to cluster indices.

◆ matrix_function_compute_mu()

template<typename MatrixType >
NumTraits< typenameMatrixType::Scalar >::Real Eigen::internal::matrix_function_compute_mu ( const MatrixType &  A)

◆ matrix_function_compute_permutation()

template<typename DynVectorType , typename VectorType >
void Eigen::internal::matrix_function_compute_permutation ( const DynVectorType &  blockStart,
const DynVectorType &  eivalToCluster,
VectorType &  permutation 
)

Compute permutation which groups ei'vals in same cluster together.

◆ matrix_function_find_cluster()

template<typename Index , typename ListOfClusters >
ListOfClusters::iterator Eigen::internal::matrix_function_find_cluster ( Index  key,
ListOfClusters &  clusters 
)

Find cluster in clusters containing some value.

Parameters
[in]keyValue to find
Returns
Iterator to cluster containing key, or clusters.end() if no cluster in m_clusters contains key.

◆ matrix_function_partition_eigenvalues()

template<typename EivalsType , typename Cluster >
void Eigen::internal::matrix_function_partition_eigenvalues ( const EivalsType &  eivals,
std::list< Cluster > &  clusters 
)

Partition eigenvalues in clusters of ei'vals close to each other.

Parameters
[in]eivalsEigenvalues
[out]clustersResulting partition of eigenvalues

The partition satisfies the following two properties:

Any eigenvalue in a certain cluster is at most matrix_function_separation() away from another eigenvalue

in the same cluster.

The distance between two eigenvalues in different clusters is more than matrix_function_separation().

The implementation follows Algorithm 4.1 in the paper of Davies and Higham.

◆ matrix_function_permute_schur()

template<typename VectorType , typename MatrixType >
void Eigen::internal::matrix_function_permute_schur ( VectorType &  permutation,
MatrixType &  U,
MatrixType &  T 
)

Permute Schur decomposition in U and T according to permutation.

◆ matrix_function_solve_triangular_sylvester()

template<typename MatrixType >
MatrixType Eigen::internal::matrix_function_solve_triangular_sylvester ( const MatrixType &  A,
const MatrixType &  B,
const MatrixType &  C 
)

Solve a triangular Sylvester equation AX + XB = C.

Parameters
[in]Athe matrix A; should be square and upper triangular
[in]Bthe matrix B; should be square and upper triangular
[in]Cthe matrix C; should have correct size.
Returns
the solution X.

If A is m-by-m and B is n-by-n, then both C and X are m-by-n. The (i,j)-th component of the Sylvester equation is

\[ \sum_{k=i}^m A_{ik} X_{kj} + \sum_{k=1}^j X_{ik} B_{kj} = C_{ij}. \]

This can be re-arranged to yield:

\[ X_{ij} = \frac{1}{A_{ii} + B_{jj}} \Bigl( C_{ij} - \sum_{k=i+1}^m A_{ik} X_{kj} - \sum_{k=1}^{j-1} X_{ik} B_{kj} \Bigr). \]

It is assumed that A and B are such that the numerator is never zero (otherwise the Sylvester equation does not have a unique solution). In that case, these equations can be evaluated in the order \( i=m,\ldots,1 \) and \( j=1,\ldots,n \).

◆ matrix_log_compute_2x2()

template<typename MatrixType >
void Eigen::internal::matrix_log_compute_2x2 ( const MatrixType &  A,
MatrixType &  result 
)

Compute logarithm of 2x2 triangular matrix.

◆ matrix_log_compute_big()

template<typename MatrixType >
void Eigen::internal::matrix_log_compute_big ( const MatrixType &  A,
MatrixType &  result 
)

Compute logarithm of triangular matrices with size > 2.

This uses a inverse scale-and-square algorithm.

◆ matrix_log_compute_pade()

template<typename MatrixType >
void Eigen::internal::matrix_log_compute_pade ( MatrixType &  result,
const MatrixType &  T,
int  degree 
)

◆ matrix_log_get_pade_degree() [1/3]

int Eigen::internal::matrix_log_get_pade_degree ( double  normTminusI)
inline

◆ matrix_log_get_pade_degree() [2/3]

int Eigen::internal::matrix_log_get_pade_degree ( float  normTminusI)
inline

◆ matrix_log_get_pade_degree() [3/3]

int Eigen::internal::matrix_log_get_pade_degree ( long double  normTminusI)
inline

◆ matrix_sqrt_quasi_triangular_1x1_off_diagonal_block()

template<typename MatrixType , typename ResultType >
void Eigen::internal::matrix_sqrt_quasi_triangular_1x1_off_diagonal_block ( const MatrixType &  T,
Index  i,
Index  j,
ResultType &  sqrtT 
)

◆ matrix_sqrt_quasi_triangular_1x2_off_diagonal_block()

template<typename MatrixType , typename ResultType >
void Eigen::internal::matrix_sqrt_quasi_triangular_1x2_off_diagonal_block ( const MatrixType &  T,
Index  i,
Index  j,
ResultType &  sqrtT 
)

◆ matrix_sqrt_quasi_triangular_2x1_off_diagonal_block()

template<typename MatrixType , typename ResultType >
void Eigen::internal::matrix_sqrt_quasi_triangular_2x1_off_diagonal_block ( const MatrixType &  T,
Index  i,
Index  j,
ResultType &  sqrtT 
)

◆ matrix_sqrt_quasi_triangular_2x2_diagonal_block()

template<typename MatrixType , typename ResultType >
void Eigen::internal::matrix_sqrt_quasi_triangular_2x2_diagonal_block ( const MatrixType &  T,
Index  i,
ResultType &  sqrtT 
)

◆ matrix_sqrt_quasi_triangular_2x2_off_diagonal_block()

template<typename MatrixType , typename ResultType >
void Eigen::internal::matrix_sqrt_quasi_triangular_2x2_off_diagonal_block ( const MatrixType &  T,
Index  i,
Index  j,
ResultType &  sqrtT 
)

◆ matrix_sqrt_quasi_triangular_diagonal()

template<typename MatrixType , typename ResultType >
void Eigen::internal::matrix_sqrt_quasi_triangular_diagonal ( const MatrixType &  T,
ResultType &  sqrtT 
)

◆ matrix_sqrt_quasi_triangular_off_diagonal()

template<typename MatrixType , typename ResultType >
void Eigen::internal::matrix_sqrt_quasi_triangular_off_diagonal ( const MatrixType &  T,
ResultType &  sqrtT 
)

◆ matrix_sqrt_quasi_triangular_solve_auxiliary_equation()

template<typename MatrixType >
void Eigen::internal::matrix_sqrt_quasi_triangular_solve_auxiliary_equation ( MatrixType &  X,
const MatrixType &  A,
const MatrixType &  B,
const MatrixType &  C 
)

◆ stem_function_cos()

template<typename Scalar >
Scalar Eigen::internal::stem_function_cos ( Scalar  x,
int  n 
)

Cosine (and its derivatives).

◆ stem_function_cosh()

template<typename Scalar >
Scalar Eigen::internal::stem_function_cosh ( Scalar  x,
int  n 
)

Hyperbolic cosine (and its derivatives).

◆ stem_function_exp()

template<typename Scalar >
Scalar Eigen::internal::stem_function_exp ( Scalar  x,
int   
)

The exponential function (and its derivatives).

◆ stem_function_sin()

template<typename Scalar >
Scalar Eigen::internal::stem_function_sin ( Scalar  x,
int  n 
)

Sine (and its derivatives).

◆ stem_function_sinh()

template<typename Scalar >
Scalar Eigen::internal::stem_function_sinh ( Scalar  x,
int  n 
)

Hyperbolic sine (and its derivatives).

Variable Documentation

◆ matrix_function_separation

const float Eigen::internal::matrix_function_separation = 0.1f
static

Maximum distance allowed between eigenvalues to be considered "close".