LTL  2.0.x
Static Public Member Functions | Static Protected Member Functions | List of all members
ltl::GaussJ< T, N > Class Template Reference

Solve equation via Gauss-Jordan inversion or just do a Gauss-Jordan inversion. More...

Static Public Member Functions

static FMatrix< T, N, N > invert (FMatrix< T, N, N > a)
 invert Matrix, similar to eval() but without solving a linear equation More...
 
static FVector< T, N > solve (FMatrix< T, N, N > a, FVector< T, N > b)
 Return the solution vector x for the equation A x = b More...
 
static void eval (FMatrix< T, N, N > &a, FVector< T, N > &b)
 Solve A x = B by Gauss-Jordan elimination. b is replaced by the solution x, A is replaced by its inverse. More...
 

Static Protected Member Functions

static void getPivot (const FMatrix< T, N, N > &a, FVector< int, N > &ipiv, tNMatPivot< T > &p)
 
static void swapRows (FMatrix< T, N, N > &a, FVector< T, N > &b, tNMatPivot< T > &p)
 
static void divByPiv (FMatrix< T, N, N > &a, const tNMatPivot< T > &p)
 
static void divByPiv (FMatrix< T, N, N > &a, FVector< T, N > &b, const tNMatPivot< T > &p)
 
static void elimRow (FMatrix< T, N, N > &a, const tNMatPivot< T > &p)
 
static void elimRow (FMatrix< T, N, N > &a, FVector< T, N > &b, const tNMatPivot< T > &p)
 

Detailed Description

template<class T, int N>
class ltl::GaussJ< T, N >

Solve equation via Gauss-Jordan inversion or just do a Gauss-Jordan inversion.

Member Function Documentation

template<class T , int N>
static void ltl::GaussJ< T, N >::getPivot ( const FMatrix< T, N, N > &  a,
FVector< int, N > &  ipiv,
tNMatPivot< T > &  p 
)
inlinestaticprotected
template<class T , int N>
static void ltl::GaussJ< T, N >::swapRows ( FMatrix< T, N, N > &  a,
FVector< T, N > &  b,
tNMatPivot< T > &  p 
)
inlinestaticprotected
template<class T , int N>
static void ltl::GaussJ< T, N >::divByPiv ( FMatrix< T, N, N > &  a,
const tNMatPivot< T > &  p 
)
inlinestaticprotected
template<class T , int N>
static void ltl::GaussJ< T, N >::divByPiv ( FMatrix< T, N, N > &  a,
FVector< T, N > &  b,
const tNMatPivot< T > &  p 
)
inlinestaticprotected
template<class T , int N>
static void ltl::GaussJ< T, N >::elimRow ( FMatrix< T, N, N > &  a,
const tNMatPivot< T > &  p 
)
inlinestaticprotected
template<class T , int N>
static void ltl::GaussJ< T, N >::elimRow ( FMatrix< T, N, N > &  a,
FVector< T, N > &  b,
const tNMatPivot< T > &  p 
)
inlinestaticprotected
template<class T , int N>
static FMatrix<T, N, N> ltl::GaussJ< T, N >::invert ( FMatrix< T, N, N >  a)
inlinestatic

invert Matrix, similar to eval() but without solving a linear equation

References ltl::GaussJ< T, N >::divByPiv(), ltl::GaussJ< T, N >::elimRow(), ltl::GaussJ< T, N >::getPivot(), and ltl::FMatrix< T, M, N >::swapRows().

template<class T , int N>
static FVector<T, N> ltl::GaussJ< T, N >::solve ( FMatrix< T, N, N >  a,
FVector< T, N >  b 
)
inlinestatic
template<class T , int N>
static void ltl::GaussJ< T, N >::eval ( FMatrix< T, N, N > &  a,
FVector< T, N > &  b 
)
inlinestatic

Solve A x = B by Gauss-Jordan elimination. b is replaced by the solution x, A is replaced by its inverse.

References ltl::GaussJ< T, N >::divByPiv(), ltl::GaussJ< T, N >::elimRow(), ltl::GaussJ< T, N >::getPivot(), and ltl::GaussJ< T, N >::swapRows().