PolyFEM
Loading...
Searching...
No Matches
ImplicitQRSVD.h File Reference
#include "Tools.h"
Include dependency graph for ImplicitQRSVD.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  JIXIE::GivensRotation< T >
 Class for givens rotation. More...
 

Namespaces

namespace  JIXIE
 Copyright (c) 2016 Theodore Gast, Chuyuan Fu, Chenfanfu Jiang, Joseph Teran.
 

Functions

template<class T >
void JIXIE::zeroChase (Eigen::Matrix< T, 3, 3 > &H, Eigen::Matrix< T, 3, 3 > &U, Eigen::Matrix< T, 3, 3 > &V)
 zero chasing the 3X3 matrix to bidiagonal form original form of H: x x 0 x x x 0 0 x after zero chase: x x 0 0 x x 0 0 x
 
template<class T >
void JIXIE::makeUpperBidiag (Eigen::Matrix< T, 3, 3 > &H, Eigen::Matrix< T, 3, 3 > &U, Eigen::Matrix< T, 3, 3 > &V)
 make a 3X3 matrix to upper bidiagonal form original form of H: x x x x x x x x x after zero chase: x x 0 0 x x 0 0 x
 
template<class T >
void JIXIE::makeLambdaShape (Eigen::Matrix< T, 3, 3 > &H, Eigen::Matrix< T, 3, 3 > &U, Eigen::Matrix< T, 3, 3 > &V)
 make a 3X3 matrix to lambda shape original form of H: x x x x x x x x x after : x 0 0 x x 0 x 0 x
 
template<class TA , class T , class TS >
enable_if_t< isSize< TA >(2, 2) &&isSize< TS >(2, 2)> JIXIE::polarDecomposition (const Eigen::MatrixBase< TA > &A, GivensRotation< T > &R, const Eigen::MatrixBase< TS > &S_Sym)
 2x2 polar decomposition.
 
template<class TA , class TR , class TS >
enable_if_t< isSize< TA >(2, 2) &&isSize< TR >(2, 2) &&isSize< TS >(2, 2)> JIXIE::polarDecomposition (const Eigen::MatrixBase< TA > &A, const Eigen::MatrixBase< TR > &R, const Eigen::MatrixBase< TS > &S_Sym)
 2x2 polar decomposition.
 
template<class TA , class T , class Ts >
enable_if_t< isSize< TA >(2, 2) &&isSize< Ts >(2, 1)> JIXIE::singularValueDecomposition (const Eigen::MatrixBase< TA > &A, GivensRotation< T > &U, const Eigen::MatrixBase< Ts > &Sigma, GivensRotation< T > &V, const ScalarType< TA > tol=64 *std::numeric_limits< ScalarType< TA > >::epsilon())
 2x2 SVD (singular value decomposition) A=USV'
 
template<class TA , class TU , class Ts , class TV >
enable_if_t< isSize< TA >(2, 2) &&isSize< TU >(2, 2) &&isSize< TV >(2, 2) &&isSize< Ts >(2, 1)> JIXIE::singularValueDecomposition (const Eigen::MatrixBase< TA > &A, const Eigen::MatrixBase< TU > &U, const Eigen::MatrixBase< Ts > &Sigma, const Eigen::MatrixBase< TV > &V, const ScalarType< TA > tol=64 *std::numeric_limits< ScalarType< TA > >::epsilon())
 2x2 SVD (singular value decomposition) A=USV'
 
template<class T >
JIXIE::wilkinsonShift (const T a1, const T b1, const T a2)
 compute wilkinsonShift of the block a1 b1 b1 a2 based on the wilkinsonShift formula mu = c + d - sign (d) \ sqrt (d*d + b*b), where d = (a-c)/2
 
template<int t, class T >
void JIXIE::process (Eigen::Matrix< T, 3, 3 > &B, Eigen::Matrix< T, 3, 3 > &U, Eigen::Matrix< T, 3, 1 > &sigma, Eigen::Matrix< T, 3, 3 > &V)
 Helper function of 3X3 SVD for processing 2X2 SVD.
 
template<class T >
void JIXIE::flipSign (int i, Eigen::Matrix< T, 3, 3 > &U, Eigen::Matrix< T, 3, 1 > &sigma)
 Helper function of 3X3 SVD for flipping signs due to flipping signs of sigma.
 
template<int t, class T >
enable_if_t< t==0 > JIXIE::sort (Eigen::Matrix< T, 3, 3 > &U, Eigen::Matrix< T, 3, 1 > &sigma, Eigen::Matrix< T, 3, 3 > &V)
 Helper function of 3X3 SVD for sorting singular values.
 
template<int t, class T >
enable_if_t< t==1 > JIXIE::sort (Eigen::Matrix< T, 3, 3 > &U, Eigen::Matrix< T, 3, 1 > &sigma, Eigen::Matrix< T, 3, 3 > &V)
 Helper function of 3X3 SVD for sorting singular values.
 
template<class T >
int JIXIE::singularValueDecomposition (const Eigen::Matrix< T, 3, 3 > &A, Eigen::Matrix< T, 3, 3 > &U, Eigen::Matrix< T, 3, 1 > &sigma, Eigen::Matrix< T, 3, 3 > &V, T tol=1024 *std::numeric_limits< T >::epsilon())
 3X3 SVD (singular value decomposition) A=USV'
 
template<class T >
void JIXIE::polarDecomposition (const Eigen::Matrix< T, 3, 3 > &A, Eigen::Matrix< T, 3, 3 > &R, Eigen::Matrix< T, 3, 3 > &S_Sym)
 3X3 polar decomposition.