Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.2
-
None
-
None
Description
I am (ab-)using the GaussNewtonOptimizer as a MultivariateFunctionSolver (as I could not find one in commons.math). Recently I stumbled upon an interesting behavior in one of my test cases: If a function is defined in a way that yields a minimum (a root in my case) at a singular point, the solver crashes. This is because of the following lines in doOptimize():
catch (SingularMatrixException e)
{ throw new ConvergenceException(LocalizedFormats.UNABLE_TO_SOLVE_SINGULAR_PROBLEM); }I would propose to add a convergence check into the catch-phrase, so the solver returns the solution in that special case.