## org.apache.commons.math.optimization.direct
Class PowellOptimizer.LineSearch

    java.lang.Object
      org.apache.commons.math.optimization.direct.PowellOptimizer.LineSearch

Enclosing class:
  PowellOptimizer

    private class PowellOptimizer.LineSearch

extends Object

Class for finding the minimum of the objective function along a given direction.

Field Summary
`private BracketFinder` `bracket` Automatic bracketing.
`private AbstractUnivariateRealOptimizer` `optim` Optimizer.
`private double` `optimum` Value of the optimum.
`private double` `valueAtOptimum` Value of the objective function at the optimum.

Constructor Summary
`PowellOptimizer.LineSearch(double relativeTolerance, double absoluteTolerance)`

Method Summary
`double` `getOptimum()`
`double` `getValueAtOptimum()`
`void` `search(double[] p, double[] d)` Find the minimum of the function `f(p + alpha * d)`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### optim

    private final AbstractUnivariateRealOptimizer optim

  Optimizer.

### bracket

    private final BracketFinder bracket

  Automatic bracketing.

### optimum

    private double optimum

  Value of the optimum.

### valueAtOptimum

    private double valueAtOptimum

  Value of the objective function at the optimum.

Constructor Detail

### PowellOptimizer.LineSearch

    public PowellOptimizer.LineSearch(double relativeTolerance,
                                      double absoluteTolerance)

Parameters:
  `relativeTolerance` - Relative tolerance.
  `absoluteTolerance` - Absolute tolerance.

Method Detail

### search

    public void search(double[] p,
                       double[] d)
                throws OptimizationException,
                       FunctionEvaluationException

  Find the minimum of the function `f(p + alpha * d)`.

  Parameters:
    `p` - Starting point.
    `d` - Search direction.
  Throws:
    `FunctionEvaluationException` - if function cannot be evaluated at some test point
    `OptimizationException` - if algorithm fails to converge

### getOptimum

    public double getOptimum()

  Returns:
    the optimum.

### getValueAtOptimum

    public double getValueAtOptimum()

  Returns:
    the value of the function at the optimum.

Copyright (c) 2003-2013 Apache Software Foundation