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]
|
static double |
minimize(Function1x1 func,
double a,
double fa,
double b,
double fb,
double eps,
double feps)
Implementation of a modified Golden section search for minimizing |f(s)|,
guaranteeing that the final call to func is at the returned minimum
|
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)public static double minimize(Function1x1 func, double a, double fa, double b, double fb, double eps, double feps)
a
- left-side of search intervalfa
- f(a)b
- right-side of search intervalfb
- f(b)eps
- tolerance for interval [a,b]feps
- tolerance for function evaluation, |f(s)| <
feps considered a rootfunc
- function to evaluate