PolyFEM
Loading...
Searching...
No Matches
JIXIE::GivensRotation< T > Class Template Reference

Class for givens rotation. More...

#include <ImplicitQRSVD.h>

Public Member Functions

 GivensRotation (int rowi_in, int rowk_in)
 
 GivensRotation (T a, T b, int rowi_in, int rowk_in)
 
 ~GivensRotation ()
 
void transposeInPlace ()
 
void compute (const T a, const T b)
 Compute c and s from a and b so that ( c -s ) ( a ) = ( * ) s c b ( 0 )
 
void computeUnconventional (const T a, const T b)
 This function computes c and s so that ( c -s ) ( a ) = ( 0 ) s c b ( * )
 
template<class MatrixType >
void fill (const MatrixType &R) const
 Fill the R with the entries of this rotation.
 
template<class MatrixType >
void rowRotation (MatrixType &A) const
 This function does something like c -s 0 ( s c 0 ) A -> A 0 0 1 It only affects row i and row k of A.
 
template<class MatrixType >
void columnRotation (MatrixType &A) const
 This function does something like c s 0 A ( -s c 0 ) -> A 0 0 1 It only affects column i and column k of A.
 
void operator*= (const GivensRotation< T > &A)
 Multiply givens must be for same row and column.
 
GivensRotation< T > operator* (const GivensRotation< T > &A) const
 Multiply givens must be for same row and column.
 

Public Attributes

int rowi
 
int rowk
 
c
 
s
 

Detailed Description

template<class T>
class JIXIE::GivensRotation< T >

Class for givens rotation.

Row rotation G*A corresponds to something like c -s 0 ( s c 0 ) A 0 0 1 Column rotation A G' corresponds to something like c -s 0 A ( s c 0 ) 0 0 1

c and s are always computed so that ( c -s ) ( a ) = ( * ) s c b ( 0 )

Assume rowi<rowk.

Definition at line 102 of file ImplicitQRSVD.h.

Constructor & Destructor Documentation

◆ GivensRotation() [1/2]

template<class T >
JIXIE::GivensRotation< T >::GivensRotation ( int  rowi_in,
int  rowk_in 
)
inline

Definition at line 109 of file ImplicitQRSVD.h.

◆ GivensRotation() [2/2]

template<class T >
JIXIE::GivensRotation< T >::GivensRotation ( a,
b,
int  rowi_in,
int  rowk_in 
)
inline

Definition at line 117 of file ImplicitQRSVD.h.

References JIXIE::GivensRotation< T >::compute().

Here is the call graph for this function:

◆ ~GivensRotation()

template<class T >
JIXIE::GivensRotation< T >::~GivensRotation ( )
inline

Definition at line 124 of file ImplicitQRSVD.h.

Member Function Documentation

◆ columnRotation()

template<class T >
template<class MatrixType >
void JIXIE::GivensRotation< T >::columnRotation ( MatrixType &  A) const
inline

This function does something like c s 0 A ( -s c 0 ) -> A 0 0 1 It only affects column i and column k of A.

Definition at line 210 of file ImplicitQRSVD.h.

References JIXIE::GivensRotation< T >::c, JIXIE::GivensRotation< T >::rowi, JIXIE::GivensRotation< T >::rowk, and JIXIE::GivensRotation< T >::s.

Referenced by JIXIE::makeLambdaShape(), JIXIE::makeUpperBidiag(), JIXIE::process(), JIXIE::singularValueDecomposition(), and JIXIE::zeroChase().

Here is the caller graph for this function:

◆ compute()

template<class T >
void JIXIE::GivensRotation< T >::compute ( const T  a,
const T  b 
)
inline

Compute c and s from a and b so that ( c -s ) ( a ) = ( * ) s c b ( 0 )

Definition at line 136 of file ImplicitQRSVD.h.

References JIXIE::GivensRotation< T >::c, JIXIE::MATH_TOOLS::rsqrt(), and JIXIE::GivensRotation< T >::s.

Referenced by JIXIE::GivensRotation< T >::GivensRotation(), JIXIE::singularValueDecomposition(), and JIXIE::zeroChase().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeUnconventional()

template<class T >
void JIXIE::GivensRotation< T >::computeUnconventional ( const T  a,
const T  b 
)
inline

This function computes c and s so that ( c -s ) ( a ) = ( 0 ) s c b ( * )

Definition at line 156 of file ImplicitQRSVD.h.

References JIXIE::GivensRotation< T >::c, JIXIE::MATH_TOOLS::rsqrt(), and JIXIE::GivensRotation< T >::s.

Referenced by JIXIE::makeLambdaShape(), and JIXIE::singularValueDecomposition().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fill()

template<class T >
template<class MatrixType >
void JIXIE::GivensRotation< T >::fill ( const MatrixType &  R) const
inline

Fill the R with the entries of this rotation.

Definition at line 174 of file ImplicitQRSVD.h.

References JIXIE::GivensRotation< T >::c, JIXIE::GivensRotation< T >::rowi, JIXIE::GivensRotation< T >::rowk, and JIXIE::GivensRotation< T >::s.

Referenced by JIXIE::polarDecomposition(), and JIXIE::singularValueDecomposition().

Here is the caller graph for this function:

◆ operator*()

template<class T >
GivensRotation< T > JIXIE::GivensRotation< T >::operator* ( const GivensRotation< T > &  A) const
inline

Multiply givens must be for same row and column.

Definition at line 234 of file ImplicitQRSVD.h.

◆ operator*=()

template<class T >
void JIXIE::GivensRotation< T >::operator*= ( const GivensRotation< T > &  A)
inline

Multiply givens must be for same row and column.

Definition at line 223 of file ImplicitQRSVD.h.

References JIXIE::GivensRotation< T >::c, and JIXIE::GivensRotation< T >::s.

◆ rowRotation()

template<class T >
template<class MatrixType >
void JIXIE::GivensRotation< T >::rowRotation ( MatrixType &  A) const
inline

This function does something like c -s 0 ( s c 0 ) A -> A 0 0 1 It only affects row i and row k of A.

Definition at line 192 of file ImplicitQRSVD.h.

References JIXIE::GivensRotation< T >::c, JIXIE::GivensRotation< T >::rowi, JIXIE::GivensRotation< T >::rowk, and JIXIE::GivensRotation< T >::s.

Referenced by JIXIE::makeLambdaShape(), JIXIE::makeUpperBidiag(), JIXIE::polarDecomposition(), JIXIE::singularValueDecomposition(), and JIXIE::zeroChase().

Here is the caller graph for this function:

◆ transposeInPlace()

template<class T >
void JIXIE::GivensRotation< T >::transposeInPlace ( )
inline

Definition at line 126 of file ImplicitQRSVD.h.

References JIXIE::GivensRotation< T >::s.

Member Data Documentation

◆ c

◆ rowi

◆ rowk

◆ s


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