|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.spaceroots.mantissa.roots.BrentSolver
This class implements the Brent algorithm to compute the roots of a function in an interval. This class is basically a translation in Java of a fortran implementation found at netlib (zeroin.f).
| Constructor Summary | |
BrentSolver()
Simple constructor. |
|
| Method Summary | |
boolean |
findRoot(ComputableFunction function,
ConvergenceChecker checker,
int maxIter,
double x0,
double f0,
double x1,
double f1)
Solve a function in a given interval known to contain a root. |
double |
getRoot()
Get the abscissa of the root. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BrentSolver()
| Method Detail |
public boolean findRoot(ComputableFunction function,
ConvergenceChecker checker,
int maxIter,
double x0,
double f0,
double x1,
double f1)
throws FunctionException
findRoot in interface RootsFinderfunction - function for which a root should be foundchecker - checker for the convergence of the functionmaxIter - maximal number of iteration allowedx0 - abscissa of the lower bound of the intervalf0 - value of the function the lower bound of the intervalx1 - abscissa of the higher bound of the intervalf1 - value of the function the higher bound of the interval
FunctionExceptionpublic double getRoot()
getRoot in interface RootsFinder
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||