[ https://issues.apache.org/jira/browse/MATH-797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288163#comment-13288163 ]
Sébastien Brisard commented on MATH-797:
----------------------------------------
I have a jQuadrature project sitting in my workspace for almost two years now, which I'm very happy to refactor and contribute if we settle on a proper interface for Gauss integrators. I have currently implemented: Gauss-Legendre, Gauss-Chebyshev (first and second kinds), Gauss-Hermite. Integration points and weights are computed and cached if needed, so the order is not limited.
In NR for example, the integration points were computed with built-in Newton iterations. I chose bracketing instead. It may be a bit slower, but it's not called very often (only when new Gaussian rules are needed), and accuracy of the computed roots is then garanteed (to within 1ulp). It's more difficult to insure the accuracy of the weights (when you compute them on-the-fly), and I wrote a high accuracy computation of integration points and weights for the Gauss-Legendre rule, using {{BigDecimal}} (at that time, I knew but did not use Commons-Math, shame on me!).
If any of this seems interesting to you, it's right here !
One point worth noting: with Gauss integration schemes, I always wondered whether calling the integration method {{integrate(f, a, b)}} was a good idea. Indeed, generic integration schemes do not integrate the provided univariate function {{f(x)}}, but the weighted function {{f(x) * w(x)}}, which might be confusing. Of course, there is no such ambiguity with Gauss-Legendre...
> Single step integrators
> -----------------------
>
> Key: MATH-797
> URL: https://issues.apache.org/jira/browse/MATH-797
> Project: Commons Math
> Issue Type: Wish
> Affects Versions: 3.0
> Reporter: Gilles
> Assignee: Gilles
> Priority: Trivial
> Fix For: 3.1
>
>
> CM assumes that the user wants to integrate a complex function on a large interval, so the large interval has to be subdivided into many subintervals. CM does the partition, and performs convergence checks, using an iterative approach.
> However, if the function is smooth enough, no subdivision of the integration interval is required. Those use-cases could benefit from the efficiency gain of not performing a convergence check.
> The proposal is to provide a new interface "UnivariateSingleStepIntegrator":
> {code}
> interface SingleIntervalIntegrator {
> /**
> * Method for implementing a single interval integration.
> * There is no convergence checks because it is not iterative.
> *
> * @param f Function to integrate.
> * @param lower Lower bound of the interval over which to integrate.
> * @param upper Upper bound of the interval over which to integrate.
> * @return the integrated value.
> */
> double integrate(UnivariateFunction f,
> double lower,
> double upper);
> }
> {code}
> In effect, the implementation of the above "integrate" method of a new "LegendreGaussIntegratorSingleStepIntegrator" would the equivalent of "stage(1)" in the current "LegendreGaussIntegrator".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira