You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Luc Maisonobe (JIRA)" <ji...@apache.org> on 2011/07/10 13:19:59 UTC

[jira] [Commented] (MATH-599) Re-implementation of Secant-based root finding algorithms

    [ https://issues.apache.org/jira/browse/MATH-599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13062716#comment-13062716 ] 

Luc Maisonobe commented on MATH-599:
------------------------------------

A bunch of new changes have been committed.
Now the bracketing feature can be added in a post-precessing stage for solvers which do not provide it by themselves.
This is done using a static forceSide method in the UnivariateRealSolverUtils utility class.
Also the get/setAllowedSolutions have been replaced by new signatures for solve methods, for consistency
with other solvers. In fact, all setters and getters were removed between version 2.2 and 3.0 and the
properties settings are now either done at construction time (relative accuracy, absolute accuracy, function accuracy)
or at solve time (maximal number of evaluations). The allowed solutions settings seemed more similar to maximal
number of evaluation, so it it set the same way.

If everyone agrees, we could resolve this issue.

> Re-implementation of Secant-based root finding algorithms
> ---------------------------------------------------------
>
>                 Key: MATH-599
>                 URL: https://issues.apache.org/jira/browse/MATH-599
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Dennis Hendriks
>              Labels: documentation, patch
>             Fix For: 3.0
>
>         Attachments: secant-based-root-finding-algos.patch, secant-based-root-finding-algos2.patch, secant-based-root-finding-algos2.zip
>
>
> Apache Commons Math currently has a SecantSolver. It is unclear exactly what algorithm this solver implements. It states: "The algorithm is modified to maintain bracketing of a root by successive approximations. Because of forced bracketing, convergence may be slower than the unrestricted Secant algorithm. However, this implementation should in general outperform the Regula Falsi method." The Regula Falsi method is exactly the Secant method modified to maintain a bracketed solution. It is therefore unclear what other modifications were done to make it 'better' than the Regula Falsi method.
> Besides the Secant and Regula Falsi methods, several other Secant-based root-finding algorithms exist, such as the the Illinois method, and the Pegasus method. All 4 are well-known, publisched algorithms.
> I created a patch, which changes the following:
>  - Removed SecantSolver root-finding algorithm.
>  - Implemented new Secant-based root-finding algorithms: SecantSolver, RegulaFalsiSolver, IllinoisSolver, and PegasusSolver.
>  - Introduced BracketedSolution interface and AllowedSolutions enumeration, to control allowed solutions (under-approximations and over-approximations) for bracketed root-finding algorithms. Implemented for RegulaFalsiSolver, IllinoisSolver, and PegasusSolver.
>  - Fixed documentation of BaseUnivariateRealSolver.solve methods, such that documentation order of arguments matches the order of the actual arguments.
> Note that the original SecantSolver was removed, and replaced by a root-finding algorithm that actually implements the Secant root-finding algorithm. As such, existing code using the SecantSolver is not backwards compatible. That is, even though the new SecantSolver does implement the same interfaces, the root-finding solutions may differ. In particular, the new SecantSolver does not maintain a bracketed solution, and does not guarantee convergence.
> I added unit tests, and I did a build, including checkstyle checking. I did not fix all checkstyle warnings though, as I consider some of them false positives.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira