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

Gilles commented on MATH-797:
-----------------------------

I'm not familiar _at all_ with those algorithms, so I wouldn't be able to 
comment much.

However, I'm indeed eager to propose something quite soon (because time for 
code changes starts to run out for some teams in the project I work for). If 
not, they will keep their "fork" from the current CM code (and we run the risk 
of implementing something that nobody will actually test).

Thus, what I would propose is to create a code that performs what is requested, 
using a stripped-down version of your code (i.e. no interface, minimum number 
of accessors, ...), maybe hiding everything in a 
"SingleStepGaussLegendreIntegrator" class. This will enable to quickly assess 
correctness (e.g. comparing with the current CM code) and performance (the 
reason for the reporter's request).
Then we can gradually add more flexibility/refinements ("public" factories, 
etc.) as we agree on their API.

How does that sound?

                
> 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

        

Reply via email to