org.apache.commons.math3.optim.nonlinear.scalar.noderiv
Class PowellOptimizer.LineSearch

java.lang.Object
  extended by org.apache.commons.math3.optim.BaseOptimizer<UnivariatePointValuePair>
      extended by org.apache.commons.math3.optim.univariate.UnivariateOptimizer
          extended by org.apache.commons.math3.optim.univariate.BrentOptimizer
              extended by org.apache.commons.math3.optim.nonlinear.scalar.noderiv.PowellOptimizer.LineSearch
Enclosing class:
PowellOptimizer

private class PowellOptimizer.LineSearch
extends BrentOptimizer

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


Field Summary
private static double ABS_TOL_UNUSED
          Value that will pass the precondition check for BrentOptimizer but will not pass the convergence check, so that the custom checker will always decide when to stop the line search.
private  BracketFinder bracket
          Automatic bracketing.
private static double REL_TOL_UNUSED
          Value that will pass the precondition check for BrentOptimizer but will not pass the convergence check, so that the custom checker will always decide when to stop the line search.
 
Fields inherited from class org.apache.commons.math3.optim.BaseOptimizer
evaluations, iterations
 
Constructor Summary
PowellOptimizer.LineSearch(double rel, double abs)
          The "BrentOptimizer" default stopping criterion uses the tolerances to check the domain (point) values, not the function values.
 
Method Summary
 UnivariatePointValuePair search(double[] p, double[] d)
          Find the minimum of the function f(p + alpha * d).
 
Methods inherited from class org.apache.commons.math3.optim.univariate.BrentOptimizer
doOptimize
 
Methods inherited from class org.apache.commons.math3.optim.univariate.UnivariateOptimizer
computeObjectiveValue, getGoalType, getMax, getMin, getStartValue, optimize
 
Methods inherited from class org.apache.commons.math3.optim.BaseOptimizer
getConvergenceChecker, getEvaluations, getIterations, getMaxEvaluations, getMaxIterations, incrementEvaluationCount, incrementIterationCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REL_TOL_UNUSED

private static final double REL_TOL_UNUSED
Value that will pass the precondition check for BrentOptimizer but will not pass the convergence check, so that the custom checker will always decide when to stop the line search.

See Also:
Constant Field Values

ABS_TOL_UNUSED

private static final double ABS_TOL_UNUSED
Value that will pass the precondition check for BrentOptimizer but will not pass the convergence check, so that the custom checker will always decide when to stop the line search.

See Also:
Constant Field Values

bracket

private final BracketFinder bracket
Automatic bracketing.

Constructor Detail

PowellOptimizer.LineSearch

PowellOptimizer.LineSearch(double rel,
                           double abs)
The "BrentOptimizer" default stopping criterion uses the tolerances to check the domain (point) values, not the function values. We thus create a custom checker to use function values.

Parameters:
rel - Relative threshold.
abs - Absolute threshold.
Method Detail

search

public UnivariatePointValuePair search(double[] p,
                                       double[] d)
Find the minimum of the function f(p + alpha * d).

Parameters:
p - Starting point.
d - Search direction.
Returns:
the optimum.
Throws:
TooManyEvaluationsException - if the number of evaluations is exceeded.


Copyright (c) 2003-2013 Apache Software Foundation