NDEVR
API Documentation
LUDecomposition< t_type, t_m, t_n >

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

Public Member Functions

t_type det () const
 Determinant.
Matrix< t_type, t_m, t_n > getL () const
 Return lower triangular factor.
template<class t_pivot_type = sint04>
Vector< t_m, t_pivot_type > getPivot () const
 Return pivot permutation vector.
Matrix< t_type, t_m, t_n > getU () const
 Return upper triangular factor.
bool isNonsingular () const
 Is the matrix nonsingular?
template<uint01 t_nx>
Matrix< t_type, t_m, t_nx > solve (const Matrix< t_type, t_m, t_nx > &B)
 Solve A*X = B.

Detailed Description

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

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


Definition at line 40 of file LUDecomposition.hpp.

Member Function Documentation

◆ det()

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

Determinant.

Returns
det(A)
Exceptions
IllegalArgumentExceptionMatrix must be square

Definition at line 185 of file LUDecomposition.hpp.

References cast().

◆ getL()

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

Return lower triangular factor.

Returns
L

Definition at line 133 of file LUDecomposition.hpp.

◆ getPivot()

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

Return pivot permutation vector.

Returns
piv

Definition at line 175 of file LUDecomposition.hpp.

◆ getU()

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

Return upper triangular factor.

Returns
U

Definition at line 155 of file LUDecomposition.hpp.

◆ isNonsingular()

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

Is the matrix nonsingular?

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

Definition at line 119 of file LUDecomposition.hpp.

Referenced by solve().

◆ solve()

template<class t_type, uint01 t_m, uint01 t_n>
template<uint01 t_nx>
Matrix< t_type, t_m, t_nx > LUDecomposition< t_type, t_m, t_n >::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.

Definition at line 201 of file LUDecomposition.hpp.

References isNonsingular(), and IsValid().


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