API Documentation
Loading...
Searching...
No Matches
LUDecomposition< t_type, t_m, t_n > Class Template Reference

Logic for performing LU Decomposition https://en.wikipedia.org/wiki/LU_decomposition. More...

#include <LUDecomposition.hpp>

Public Member Functions

t_type det () const
 
Matrix< t_type, t_m, t_n > getL () const
 
template<class t_pivot_type = sint04>
Vector< t_m, t_pivot_type > getPivot () const
 
Matrix< t_type, t_m, t_n > getU () const
 
bool isNonsingular () const
 
 LUDecomposition (const Matrix< t_type, t_m, t_n > &A)
 
template<uint01 t_nx>
Matrix< t_type, t_m, t_nx > solve (const Matrix< t_type, t_m, t_nx > &B)
 

Detailed Description

template<class t_type, uint01 t_m, uint01 t_n>
class NDEVR::LUDecomposition< t_type, t_m, t_n >

Logic for performing LU Decomposition https://en.wikipedia.org/wiki/LU_decomposition.


Constructor & Destructor Documentation

◆ LUDecomposition()

template<class t_type , uint01 t_m, uint01 t_n>
LUDecomposition ( const Matrix< t_type, t_m, t_n > & A)
inline

Member Function Documentation

◆ det()

template<class t_type , uint01 t_m, uint01 t_n>
t_type det ( ) const
inline

Determinant

Returns
det(A)
Exceptions
IllegalArgumentExceptionMatrix must be square

◆ getL()

template<class t_type , uint01 t_m, uint01 t_n>
Matrix< t_type, t_m, t_n > getL ( ) const
inline

Return lower triangular factor

Returns
L

◆ getPivot()

template<class t_type , uint01 t_m, uint01 t_n>
template<class t_pivot_type = sint04>
Vector< t_m, t_pivot_type > getPivot ( ) const
inline

Return pivot permutation vector

Returns
piv

◆ getU()

template<class t_type , uint01 t_m, uint01 t_n>
Matrix< t_type, t_m, t_n > getU ( ) const
inline

Return upper triangular factor

Returns
U

◆ isNonsingular()

template<class t_type , uint01 t_m, uint01 t_n>
bool isNonsingular ( ) const
inline

Is the matrix nonsingular?

Returns
true if U, and hence A, is nonsingular.

◆ solve()

template<class t_type , uint01 t_m, uint01 t_n>
template<uint01 t_nx>
Matrix< t_type, t_m, t_nx > solve ( const Matrix< t_type, t_m, t_nx > & B)
inline

Solve A*X = B

Parameters
BA Matrix with as many rows as A and any number of columns.
Returns
X so that L*U*X = B(piv,:)
Exceptions
IllegalArgumentExceptionMatrix row dimensions must agree.
RuntimeExceptionMatrix is singular.

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