|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 );
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 );
|Description||Especially 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.