TMtx::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();
Write: void SetRefineSolution(const bool Value);
Remarks:

The method enables/disables the refining of the solution of the system of linear equations, computed by TMtx::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 TMtx::BackError and the the component-wise TMtx::ForwError in the computed solution are calculated as well.

Examples
#include "MtxVec.h"
#include "Units.MtxVec.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVec;

void Example()
{
    TVec *X, *B;
    TMtx* A;

    CreateIt(X, B);
    CreateIt(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);
    FreeIt(B, X);
    FreeIt(A);
}
See Also: TMtx::BackError, TMtx::ForwError, TMtx::LUSolve
Declared in Dew::Math::TMtx · Dew.Math/MtxVec.h · Cross-compiler