commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject Re: [math] replace AbstractContinuousDistribution.getSolverAbsoluteAccuracy() with AbstractContinuousDistribution.getSolver()
Date Sun, 06 Nov 2011 16:41:26 GMT
On 11/6/11 8:37 AM, S├ębastien Brisard wrote:
>>
>> [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.
>>
>>
>> Gilles
>>
> Yes, that's a good suggestion, I'll work on this idea.

Unless you are going to eliminate the bracketing step, this will not
work.  I think I now remember why that code is there, as you will
likely find in researching the archives.  The test

if (FastMath.abs(rootFindingFunction.value(lowerBound)) <
getSolverAbsoluteAccuracy()) {
              return lowerBound;
}

and similar for the upperBound is there to avoid convergence
problems in corner cases where the inverse cum is being evaluated
near 0 or 1 and the domain upper / lower bound should be returned. 
You correctly pointed out that what should be used in the test is
the function value accuracy - logically attached to the
distribution, not a solver, since if this test succeeds, no solver
will be created.  I think its best to either somehow convince
ourselves that we can eliminate this test or define a default
function value accuracy threshold to use in the test.

Phil


>
> S├ębastien
>
>
> ---------------------------------------------------------------------
>
>
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message