public class Root
extends java.lang.Object
| Constructor and Description |
|---|
Root()
Constructor with tol = 1E-7 and maxIter = 500.
|
Root(double tol,
int maxIter)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
find(DifferentiableFunction func,
double x1,
double x2)
Newton's method (also known as the Newton–Raphson method).
|
double |
find(Function func,
double x1,
double x2)
Brent's method for root-finding.
|
public Root()
public Root(double tol,
int maxIter)
tol - the accuracy tolerance.maxIter - the maximum number of allowed iterations.public double find(Function func, double x1, double x2)
func - the function to be evaluated.x1 - the left end of search interval.x2 - the right end of search interval.public double find(DifferentiableFunction func, double x1, double x2)
func - the function to be evaluated.x1 - the left end of search interval.x2 - the right end of search interval.