commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brent Worden" <br...@worden.org>
Subject RE: [math] Numerical Derivative pattern q.
Date Wed, 12 Nov 2003 04:59:06 GMT
>
> Will a Differentiator/Factory be solving for the derivative? In which
> case, as the algorithms used are really already implemented in the
> solvers, wouldn't we just expand them with methods that allow us to
> solve for the derivatives? For Example:
>
> UnivariateRealSolver bs = new BisectionSolver(...);
>
> double d = bs.solveFirstDerivative(min,max);
>
> and
>
> double d = bs.solveSecondDerivative(min,max);
>
> -Mark

I'm not too keen to the explicit method calls because it seems so limiting.
How about using decorators much like commons-collections?  We could apply a
DerivativeFunctionDecorator which alters the Function.evaluate method to
return the derivate evaluation using center differences or something
similar.  Then the decorated function could be used in the solvers or any
other place a Function object is accepted.

If someone wanted to solve for the second derivate, apply the decorator to
the original function twice.

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


Mime
View raw message