commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <>
Subject Re: [math] replace AbstractContinuousDistribution.getSolverAbsoluteAccuracy() with AbstractContinuousDistribution.getSolver()
Date Sun, 06 Nov 2011 16:28:48 GMT
On 11/6/11 7:59 AM, Gilles Sadowski wrote:
> On Sun, Nov 06, 2011 at 12:24:03AM -0700, Phil Steitz wrote:
>> On 11/6/11 12:18 AM, S├ębastien Brisard wrote:
>>>> +1, but your observation above then leads to the question where are
>>>> you going to get this value from?  There may not be a solver to read
>>>> it from.  I guess the default impl in the base class could just
>>>> return BaseAbstractUnivariateRealSolver.DEFAULT_FUNCTION_VALUE_ACCURACY.
>>>> Phil
>>> Ah, that's one option I didn't think of. I intended to follow the same
>>> scheme as for getSolverAbsoluteAccuracy(), which returns
>>> solverAbsoluteAccuracy (private field), possibly initialized with
>>> DEFAULT_SOLVER_ABSOLUTE_ACCURACY (see AbstractContinuousDistribution).
>>> Actually, using the BaseAbstractUnivariateRealSolver default value is
>>> probably better. However, these default values are private... So maybe
>>> we will have to select reasonable default values here.
>> Ugh.  I remember complaining about that (the fact that the defaults
>> were made private) for precisely this kind of reason.  Have to clone
>> the value, I guess and keep it in synch with whatever Brent uses.
>> Phil
>>> S├ębastien
> [I did not follow all the details of this discussion; sorry if I'm slightly
> off base.]  But, if somewhere some _default_ accuracy is needed to pass to a
> _default_ solver, I'd say: instantiate the solver using its _default_
> constructor; thus, no need to chase up instance variables used further up
> the hierarchy.

Read the post.  What is being reused is the default value itself. 
There may or may not be a solver instantiated.

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

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

View raw message