Multidimensional Newton-Raphson method: Difference between revisions

→‎{{header|C#}}: uses elimination, not inversion for speed
m (Start out as a draft)
(→‎{{header|C#}}: uses elimination, not inversion for speed)
Line 6:
<br><br>
=={{header|C#}}==
For matrix inversion and matrix and vector definitions - see C# source from [[Gauss-JordanGaussian matrix inversionelimination]]
<lang csharp>
using System;
Line 34:
for (int j = 0; j < size; j++)
J[i, j] = fun.df(i, j, X);
D = J.InvElimPartial() * F);
X -= DF;
//need weight vector because different coordinates can diffs by order of magnitudes
} while (DF.norm(fun.weights()) > 1e-12);
return X;
}
Anonymous user