org.apache.commons.math3.optimization.univariate

## Class BracketFinder

- java.lang.Object
- - org.apache.commons.math3.optimization.univariate.BracketFinder

Deprecated.
As of 3.1 (to be removed in 4.0).

    @Deprecated
    public class BracketFinder
    extends java.lang.Object

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
Version:
  $Id: BracketFinder.java 1422230 2012-12-15 12:11:13Z erans $

### Field Summary

Fields
`private static double` `EPS_MIN` Deprecated. Tolerance to avoid division by zero.
`private Incrementor` `evaluations` Deprecated. Counter for function evaluations.
`private double` `fHi` Deprecated. Function value at `hi`.
`private double` `fLo` Deprecated. Function value at `lo`.
`private double` `fMid` Deprecated. Function value at `mid`.
`private static double` `GOLD` Deprecated. Golden section.
`private double` `growLimit` Deprecated. Factor for expanding the interval.
`private double` `hi` Deprecated. Higher bound of the bracket.
`private double` `lo` Deprecated. Lower bound of the bracket.
`private double` `mid` Deprecated. Point inside the bracket.

### Constructor Summary

Constructors
Constructor and Description
`BracketFinder()` Deprecated. Constructor with default values `100, 50` (see the `other constructor`).
`BracketFinder(double growLimit, int maxEvaluations)` Deprecated. Create a bracketing interval finder.

### Method Summary

Methods
`private double` `eval(UnivariateFunction f, double x)` Deprecated.
`int` `getEvaluations()` Deprecated.
`double` `getFHi()` Deprecated. Get function value at `getHi()`.
`double` `getFLo()` Deprecated. Get function value at `getLo()`.
`double` `getFMid()` Deprecated. Get function value at `getMid()`.
`double` `getHi()` Deprecated.
`double` `getLo()` Deprecated.
`int` `getMaxEvaluations()` Deprecated.
`double` `getMid()` Deprecated.
`void` `search(UnivariateFunction func, GoalType goal, double xA, double xB)` Deprecated. Search new points that bracket a local optimum of the function.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### EPS_MIN

    private static final double EPS_MIN

Deprecated.
Tolerance to avoid division by zero.

See Also:
  Constant Field Values

#### GOLD

    private static final double GOLD

Deprecated.
Golden section.

See Also:
  Constant Field Values

#### growLimit

    private final double growLimit

Deprecated.
Factor for expanding the interval.

#### evaluations

    private final Incrementor evaluations

Deprecated.
Counter for function evaluations.

#### lo

    private double lo

Deprecated.
Lower bound of the bracket.

#### hi

    private double hi

Deprecated.
Higher bound of the bracket.

#### mid

    private double mid

Deprecated.
Point inside the bracket.

#### fLo

    private double fLo

Deprecated.
Function value at `lo`.

#### fHi

    private double fHi

Deprecated.
Function value at `hi`.

#### fMid

    private double fMid

Deprecated.
Function value at `mid`.

### Constructor Detail

#### BracketFinder

    public BracketFinder()

Deprecated.
Constructor with default values `100, 50` (see the `other 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 Detail

#### search

    public void search(UnivariateFunction func,
              GoalType goal,
              double xA,
              double xB)

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()`

#### getFLo

    public double getFLo()

Deprecated.
Get function value at `getLo()`.

Returns:
  function value at `getLo()`

#### getHi

    public double getHi()

Deprecated.

Returns:
  the higher bound of the bracket.
See Also:
  `getFHi()`

#### getFHi

    public double getFHi()

Deprecated.
Get function value at `getHi()`.

Returns:
  function value at `getHi()`

#### getMid

    public double getMid()

Deprecated.

Returns:
  a point in the middle of the bracket.
See Also:
  `getFMid()`

#### getFMid

    public double getFMid()

Deprecated.
Get function value at `getMid()`.

Returns:
  function value at `getMid()`

#### eval

    private double eval(UnivariateFunction f,
              double x)

Deprecated.

Parameters:
  `f` - Function.
  `x` - Argument.
Returns:
  `f(x)`
Throws:
  `TooManyEvaluationsException` - if the maximal number of evaluations is exceeded.