C:/programs/SCPPNT/src/include/lu.h File Reference

Definition of functions LU_factor and LU_solve. More...

#include <cmath>
#include "scppnt/scppnt.h"
#include "scppnt/scppnt_error.h"

Include dependency graph for lu.h:

Go to the source code of this file.


namespace  SCPPNT


template<class MaTRiX, class VecToRSubscript>
int SCPPNT::LU_factor (MaTRiX &A, VecToRSubscript &indx)
 Right-looking LU factorization algorithm (unblocked).
template<class MaTRiX, class VecToR, class VecToRSubscripts>
int SCPPNT::LU_solve (const MaTRiX &A, const VecToRSubscripts &indx, VecToR &b)
 Solve system of linear equations using LU factorization computed from LU_factor.

Detailed Description

Definition of functions LU_factor and LU_solve.

Definition of functions LU_factor and LU_solve for solving system of linear equations Ax = b.

Typical usage:

Matrix<double> A; Vector<Subscript> ipiv; Vector<double> b;

LU_Factor(A,ipiv); LU_Solve(A,ipiv,b);

Now b has the solution x. Note that both A and b are overwritten. If these values need to be preserved, one can make temporary copies, as in

Matrix<double> T = A; LU_Factor(T,ipiv); Vector<double> x=b; LU_Solve(T,ipiv,x);

Contains modified version of the functions in lu.h from the Template Numerical Toolkit (TNT) using matrix iterators rather than matrix subscripting.

Definition in file lu.h.

Generated on Tue Dec 18 23:34:13 2007 for SCPPNT by  doxygen 1.5.4