@Deprecated public class BrentOptimizer extends BaseAbstractUnivariateOptimizer
(lo, hi), this class
finds an approximation x to the point at which the function
attains its minimum.
It implements Richard Brent's algorithm (from his book "Algorithms for
Minimization without Derivatives", p. 79) for finding minima of real
univariate functions.
| Modifier and Type | Field and Description |
|---|---|
private double |
absoluteThreshold
Deprecated.
Absolute threshold.
|
private static double |
GOLDEN_SECTION
Deprecated.
Golden section.
|
private static double |
MIN_RELATIVE_TOLERANCE
Deprecated.
Minimum relative tolerance.
|
private double |
relativeThreshold
Deprecated.
Relative threshold.
|
| Constructor and Description |
|---|
BrentOptimizer(double rel,
double abs)
Deprecated.
The arguments are used for implementing the original stopping criterion
of Brent's algorithm.
|
BrentOptimizer(double rel,
double abs,
ConvergenceChecker<UnivariatePointValuePair> checker)
Deprecated.
The arguments are used implement the original stopping criterion
of Brent's algorithm.
|
| Modifier and Type | Method and Description |
|---|---|
private UnivariatePointValuePair |
best(UnivariatePointValuePair a,
UnivariatePointValuePair b,
boolean isMinim)
Deprecated.
Selects the best of two points.
|
protected UnivariatePointValuePair |
doOptimize()
Deprecated.
Method for implementing actual optimization algorithms in derived
classes.
|
computeObjectiveValue, getConvergenceChecker, getEvaluations, getGoalType, getMax, getMaxEvaluations, getMin, getStartValue, optimize, optimizeprivate static final double GOLDEN_SECTION
private static final double MIN_RELATIVE_TOLERANCE
private final double relativeThreshold
private final double absoluteThreshold
public BrentOptimizer(double rel,
double abs,
ConvergenceChecker<UnivariatePointValuePair> checker)
abs and rel define a tolerance
tol = rel |x| + abs. rel should be no smaller than
2 macheps and preferably not much less than sqrt(macheps),
where macheps is the relative machine precision. abs must
be positive.rel - Relative threshold.abs - Absolute threshold.checker - Additional, user-defined, convergence checking
procedure.NotStrictlyPositiveException - if abs <= 0.NumberIsTooSmallException - if rel < 2 * Math.ulp(1d).public BrentOptimizer(double rel,
double abs)
abs and rel define a tolerance
tol = rel |x| + abs. rel should be no smaller than
2 macheps and preferably not much less than sqrt(macheps),
where macheps is the relative machine precision. abs must
be positive.rel - Relative threshold.abs - Absolute threshold.NotStrictlyPositiveException - if abs <= 0.NumberIsTooSmallException - if rel < 2 * Math.ulp(1d).protected UnivariatePointValuePair doOptimize()
doOptimize in class BaseAbstractUnivariateOptimizerprivate UnivariatePointValuePair best(UnivariatePointValuePair a, UnivariatePointValuePair b, boolean isMinim)
a - Point and value.b - Point and value.isMinim - true if the selected point must be the one with
the lowest value.null if a and b are
both null. When a and b have the same function
value, a is returned.Copyright (c) 2003-2015 Apache Software Foundation