Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.math3.optim.univariate
Class BracketFinder

    java.lang.Object
      org.apache.commons.math3.optim.univariate.BracketFinder

    public class BracketFinder

extends 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 1413186 2012-11-24 13:47:59Z erans $

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

Method Summary
`int` | `getEvaluations()`
`double` | `getFHi()` Get function value at `getHi()`.
`double` | `getFLo()` Get function value at `getLo()`.
`double` | `getFMid()` Get function value at `getMid()`.
`double` | `getHi()`
`double` | `getLo()`
`int` | `getMaxEvaluations()`
`double` | `getMid()`
`void` | `search(UnivariateFunction func, GoalType goal, double xA, double xB)` 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`

Constructor Detail

### BracketFinder

    public BracketFinder()

  Constructor with default values `100, 50` (see the `other constructor`).

### BracketFinder

    public BracketFinder(double growLimit,
                         int maxEvaluations)

  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)

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

  Returns:
    the number of evalutations.

### getEvaluations

    public int getEvaluations()

  Returns:
    the number of evalutations.

### getLo

    public double getLo()

  Returns:
    the lower bound of the bracket.
  See Also:
    `getFLo()`

### getFLo

    public double getFLo()

  Get function value at `getLo()`.

  Returns:
    function value at `getLo()`

### getHi

    public double getHi()

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

### getFHi

    public double getFHi()

  Get function value at `getHi()`.

  Returns:
    function value at `getHi()`

### getMid

    public double getMid()

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

### getFMid

    public double getFMid()

  Get function value at `getMid()`.

  Returns:
    function value at `getMid()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.