commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <>
Subject [math] removing requiresDenseOutput from StepHandler interface
Date Wed, 22 Jun 2011 14:26:45 GMT

Jira issue MATH-596 <> 
shows what seems to me a very old design problem (it dates back to the 
Mantissa library, exactly on 2002-12-24!).

The problem is the requiresDenseOutput method declared in the 
StepHandler interface. This interface is a user interface (so it cannot 
be an abstract class by the way). I think the method should be removed. 
Here are the rationale I listed in the comments on the Jira issue:

 > This requiresDenseOutput was added long ago (even before this code was
 > included in Apache Commons Math) as an optimization to avoid calling
 > computeDerivatives too many times for some integrators. In fact, only
 > Dormand-Prince 8 (5,3) needs it because if the interpolator is not
 > used, we can save 3 calls per step.
 > Now I think this feature brings more problems than it solves:
 > it forces users to implement this method despite its purpose is not
 > clear, obviously it creates problems with at least
 > Gragg-Bulirsch-Stoer since this integrator really needs interpolation
 > it will create the same problems for Adams integrators (they also need
 > interpolation) this "optimization" is useful only for one integrator
 > in many cases, even for this integrator it does not optimize anything
 > since people will need interpolation
 > So I would like to completely remove this.

Removing the method is backward compatible for users.
Any thought about this ?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message