public class GoldenSectionSearch
extends java.lang.Object
Constructor and Description |
---|
GoldenSectionSearch() |
Modifier and Type | Method and Description |
---|---|
static double |
minimize(Function1x1 f,
double a,
double b,
double tol,
double ftol)
Performs a Golden Section Search to find the minimum of a function f
in the range [a, b]
|
public static double minimize(Function1x1 f, double a, double b, double tol, double ftol)
f
- function to minimizea
- lower bound of minimizerb
- upper bound of minimizertol
- tolerance for answer (
iterations will stop if b-a <
tol)ftol
- function tolerance
(iterations will stop if f(c) doesn't seem to vary outside this range within bounds)