Matrix::RefineSolution Property

__declspec(property(get = GetRefineSolution, put = SetRefineSolution)) bool RefineSolution;

Enables/disables the refining of the solution of the system of linear equations.

Read: bool GetRefineSolution() const;
Write: void SetRefineSolution(const bool value) const;
Remarks:

The method enables/disables the refining of the solution of the system of linear equations, computed by Matrix::LUSolve method. When RefineSolution is enabled, an iterative refinement of the solution to a system of linear equations is executed. For each computed solution the component-wise Matrix::BackError and the the component-wise Matrix::ForwError in the computed solution are calculated as well.

Examples
#include "MtxExpr.h"
#include "MtxVec.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    Vector X, B;
    Matrix A;

    B.SetIt(false, DewArray<double>{0, 2});
    A.SetIt(2, 2, false, DewArray<double>{1, 2, 3, 4}); // 2x2, not complex matrix
    A.RefineSolution = true;
    A.ConditionNumber = TConditionNumber::cnNormInf;
    A.LUSolve(B, X);
}
See Also: Matrix::BackError, Matrix::ForwError, Matrix::LUSolve
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler