Boolean RefineSolution { get; set; }
Enables/disables the refining of the solution of the system of linear equations.
Returns: Boolean
Remarks:
The method enables/disables the refining of the solution of the system of linear equations, computed by Dew.Math.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 Dew.Math.TMtx.BackError and the the component-wise Dew.Math.TMtx.ForwError in the computed solution are calculated as well.
Examples
TVec X;
TVec B;
TMtx A;
MtxVec.CreateIt(out X, out B);
MtxVec.CreateIt(out A);
try
{
B.SetIt(false,new double[] {0,2});
A.SetIt(2,2,false,[1,2,
3,4]); // 2x2, !complex matrix
A.RefineSolution = true;
A.ConditionNumber = cnNormInf;
A.LUSolve(B,X);
}
finally
{
MtxVec.FreeIt(ref B, ref X);
MtxVec.FreeIt(ref A);
}