Class BracketFinder
java.lang.Object
org.apache.commons.math3.optimization.univariate.BracketFinder
Deprecated.
As of 3.1 (to be removed in 4.0).
Provide an interval that brackets a local optimum of a function.
This code is based on a Python implementation (from SciPy,
module
optimize.py v0.5).- Since:
- 2.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final doubleDeprecated.Tolerance to avoid division by zero.private final IncrementorDeprecated.Counter for function evaluations.private doubleDeprecated.Function value athi.private doubleDeprecated.Function value atlo.private doubleDeprecated.Function value atmid.private static final doubleDeprecated.Golden section.private final doubleDeprecated.Factor for expanding the interval.private doubleDeprecated.Higher bound of the bracket.private doubleDeprecated.Lower bound of the bracket.private doubleDeprecated.Point inside the bracket. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Constructor with default values100, 50(see theother constructor).BracketFinder(double growLimit, int maxEvaluations) Deprecated.Create a bracketing interval finder. -
Method Summary
Modifier and TypeMethodDescriptionprivate doubleeval(UnivariateFunction f, double x) Deprecated.intDeprecated.doublegetFHi()Deprecated.Get function value atgetHi().doublegetFLo()Deprecated.Get function value atgetLo().doublegetFMid()Deprecated.Get function value atgetMid().doublegetHi()Deprecated.doublegetLo()Deprecated.intDeprecated.doublegetMid()Deprecated.voidsearch(UnivariateFunction func, GoalType goal, double xA, double xB) Deprecated.Search new points that bracket a local optimum of the function.
-
Field Details
-
EPS_MIN
private static final double EPS_MINDeprecated.Tolerance to avoid division by zero.- See Also:
-
GOLD
private static final double GOLDDeprecated.Golden section.- See Also:
-
growLimit
private final double growLimitDeprecated.Factor for expanding the interval. -
evaluations
-
lo
private double loDeprecated.Lower bound of the bracket. -
hi
private double hiDeprecated.Higher bound of the bracket. -
mid
private double midDeprecated.Point inside the bracket. -
fLo
-
fHi
-
fMid
-
-
Constructor Details
-
BracketFinder
public BracketFinder()Deprecated.Constructor with default values100, 50(see theother constructor). -
BracketFinder
public BracketFinder(double growLimit, int maxEvaluations) Deprecated.Create a bracketing interval finder.- Parameters:
growLimit- Expanding factor.maxEvaluations- Maximum number of evaluations allowed for finding a bracketing interval.
-
-
Method Details
-
search
Deprecated.Search new points that bracket a local optimum of the function.- Parameters:
func- Function whose optimum should be bracketed.goal-Goal type.xA- Initial point.xB- Initial point.- Throws:
TooManyEvaluationsException- if the maximum number of evaluations is exceeded.
-
getMaxEvaluations
public int getMaxEvaluations()Deprecated.- Returns:
- the number of evalutations.
-
getEvaluations
public int getEvaluations()Deprecated.- Returns:
- the number of evalutations.
-
getLo
public double getLo()Deprecated.- Returns:
- the lower bound of the bracket.
- See Also:
-
getFLo
-
getHi
public double getHi()Deprecated.- Returns:
- the higher bound of the bracket.
- See Also:
-
getFHi
-
getMid
public double getMid()Deprecated.- Returns:
- a point in the middle of the bracket.
- See Also:
-
getFMid
-
eval
Deprecated.- Parameters:
f- Function.x- Argument.- Returns:
f(x)- Throws:
TooManyEvaluationsException- if the maximal number of evaluations is exceeded.
-