commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <p...@steitz.com>
Subject Re: [math] Priority
Date Wed, 28 May 2003 11:21:36 GMT
Brent Worden wrote:
>>and unit tests.  While things like rootfinding for
>>non-differentiable functions
>>may eventually have a place and may benefit from algorithms that
>>someone can
>>claim copyright ownership of, if no one else does it before I get
>>to it, I will
>>translate my simple newton's method implementation (which is trivial) and
>>submit it. I would appreciate input on what a nice Java interface
>>would look
>>like for rootfinding, initally assuming that the function has a
>>derivative, but
>>ideally extensible to support strategies that do not require
>>differentiability.
> 
> 
> In the chi-square patch, I created a root finding utility class.  I used the
> bisection method to provide a default mechanism for computing inverse CDFs.
> It's driven by a simple Function interface.  Check it out and see if it's
> something you can use or improve.
> 
> The relevant types are org.apache.jakarta.commons.math.RootFinding and
> org.apache.jakarta.commons.math.Function and there it's utilized in
> org.apache.jakarta.commons.math.stat.distribution.AbstractContinuousDistribu
> tion.
> 
> Let me know what you think.
> 

Looks fine to me,at least.  I was looking for some magical way to avoid 
the "Function" interface requirement; but after thinking about this some 
more and looking at your implementation, I think that is about as 
convenient as we can make it for users.  Newton's method or other 
algorithms could be added as alternative RootFinding strategies.  I 
didn't think of bisection, which is a great idea for the CDF inversion 
application, since these functions tend to be well-behaved.  Thanks for 
setting this up.

Phil

> Brent Worden
> http://www.brent.worden.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 




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


Mime
View raw message