MF_LUsolve MD_LUsolve ME_LUsolve
MCF_LUsolve MCD_LUsolve MCE_LUsolve
Functionsolve a linear system MA * X = B, where MA has already been decomposed into LU form
Syntax C/C++#include <MFstd.h>
void MF_LUsolve( fVector X, fMatrix LU, fVector B, uVector Ind, ui len );
C++ MatObj#include <OptiVec.h>
void vector<T>::LUsolve( const matrix<T>& MLU, const vector<T>& B, const vector<unsigned>& Ind );
Pascal/Delphiuses MFstd;
procedure MF_LUsolve( X:fVector; MLU:fMatrix; B:fVector; Ind:uVector; len:UIntSize );
DescriptionThe linear system MA * X = B is solved for the vector X. Instead of MA itself, this function expects the LU decomposed form of MA as the input matrix MLU, along with its row-permutation indices in the vector Ind as output by MF_LUdecompose.
If the original matrix MA is still available, it is recommended to "fine-polish" the result by calling MF_LUimprove. In comparison to the LU decomposition and back-substitution already performed, this iterative improvement takes very little time, but it can lead to an appreaciable improvement of the solution and often even save solutions which otherwise would be ruined by round-off error.
See alsochapter 10

MatrixLib Table of Contents  OptiVec home