public interface Root
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
logger |
| Modifier and Type | Method and Description |
|---|---|
static double |
find(DifferentiableFunction func,
double x1,
double x2,
double tol,
int maxIter)
Newton's method (also known as the Newton–Raphson method).
|
static double |
find(Function func,
double x1,
double x2,
double tol,
int maxIter)
Brent's method for root-finding.
|
static double find(Function func, double x1, double x2, double tol, int maxIter)
The method is guaranteed to converge as long as the function can be evaluated within the initial interval known to contain a root.
func - the function to be evaluated.x1 - the left end of search interval.x2 - the right end of search interval.tol - the desired accuracy (convergence tolerance).maxIter - the maximum number of iterations.static double find(DifferentiableFunction func, double x1, double x2, double tol, int maxIter)
func - the function to be evaluated.x1 - the left end of search interval.x2 - the right end of search interval.tol - the desired accuracy (convergence tolerance).maxIter - the maximum number of iterations.