MF_LUimprove MD_LUimprove ME_LUimprove
MCF_LUimprove MCD_LUimprove MCE_LUimprove
   
MFb_LUimprove MDb_LUimprove MEb_LUimprove
MCFb_LUimprove MCDb_LUimprove MCEb_LUimprove
Functioniterative improvement of the solution of a linear system solved by LU decomposition
Syntax C/C++#include <MFstd.h>
void MF_LUimprove( fVector X, fVector B, fMatrix MA, fMatrix LU, uiVector Ind, ui len );
void MFb_LUimprove( fVector X, fVector B, fMatrix MA, fMatrix LU, uiVector Ind, ui len, fVector Buf );
C++ MatObj#include <OptiVec.h>
void vector<T>::LUimprove( const vector<T> B, const matrix<T>& MA, const matrix<T>& MLU, const vector<ui>& Ind );
void vector<T>::LUbimprove( const vector<T> B, const matrix<T>& MA, const matrix<T>& MLU, const vector<ui>& Ind, vector<T> Buf );
Pascal/Delphiuses MFstd;
procedure MF_LUimprove( X, B:fVector; MA, MLU:fMatrix; Ind:uiVector; len:UIntSize );
procedure MFb_LUimprove( X, B:fVector; MA, MLU:fMatrix; Ind:uiVector; len:UIntSize; Buf:fVector );
DescriptionEspecially for large matrices, accumulated round-off error in LU decomposition may become quite noticable. This round-off error will translate into inaccurate results of MF_LUsolve. If the input matrix was not overwritten by the output matrix in the initial call to MF_LUdecompose, you may call MF_LUimprove after MF_LUsolve to improve the accuracy by iteration. MF_LUimprove needs the output vector X of MF_LUsolve, the right-hand-side vector B of the linear system, and both the original matrix MA and its raw LU-decomposed form MLU along with its permutation indices, Ind, as arguments.

This function needs buffer memory. The "normal" versions (prefixes MF_, MCF_ etc.) allocate it themselves, whereas the version with the prefixes MFb_, MCFb_ etc. take a vector Buf as an additional argument. The required size of Buf is len elements of the respective data type.

See alsochapter 10

MatrixLib Table of Contents  OptiVec home