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

java.lang.Object
  extended by org.apache.commons.math.optimization.direct.BaseAbstractScalarOptimizer<MultivariateRealFunction>
      extended by org.apache.commons.math.optimization.direct.PowellOptimizer
All Implemented Interfaces:
BaseMultivariateRealOptimizer<MultivariateRealFunction>, BaseOptimizer<RealPointValuePair>, MultivariateRealOptimizer

public class PowellOptimizer
extends BaseAbstractScalarOptimizer<MultivariateRealFunction>
implements MultivariateRealOptimizer

Powell algorithm. This code is translated and adapted from the Python version of this algorithm (as implemented in module optimize.py v0.5 of SciPy).
The default stopping criterion is based on the differences of the function value between two successive iterations. It is however possible to define a custom convergence checker that might terminate the algorithm earlier.

Since:
2.2
Version:
$Id$

Field Summary
 
Fields inherited from class org.apache.commons.math.optimization.direct.BaseAbstractScalarOptimizer
evaluations
 
Constructor Summary
PowellOptimizer(double rel, double abs)
          The parameters control the default convergence checking procedure, and the line search tolerances.
PowellOptimizer(double rel, double abs, ConvergenceChecker<RealPointValuePair> checker)
          This constructor allows to specify a user-defined convergence checker, in addition to the parameters that control the default convergence checking procedure and the line search tolerances.
 
Method Summary
protected  RealPointValuePair doOptimize()
          Perform the bulk of the optimization algorithm.
 
Methods inherited from class org.apache.commons.math.optimization.direct.BaseAbstractScalarOptimizer
computeObjectiveValue, getConvergenceChecker, getEvaluations, getGoalType, getMaxEvaluations, getStartPoint, optimize, setConvergenceChecker
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.math.optimization.BaseMultivariateRealOptimizer
optimize
 
Methods inherited from interface org.apache.commons.math.optimization.BaseOptimizer
getConvergenceChecker, getEvaluations, getMaxEvaluations, setConvergenceChecker
 

Constructor Detail

PowellOptimizer

public PowellOptimizer(double rel,
                       double abs,
                       ConvergenceChecker<RealPointValuePair> checker)
This constructor allows to specify a user-defined convergence checker, in addition to the parameters that control the default convergence checking procedure and the line search tolerances.

Parameters:
rel - Relative threshold.
abs - Absolute threshold.
checker - Convergence checker.
Throws:
NotStrictlyPositiveException - if abs <= 0.
NumberIsTooSmallException - if rel < 2 * Math.ulp(1d).

PowellOptimizer

public PowellOptimizer(double rel,
                       double abs)
The parameters control the default convergence checking procedure, and the line search tolerances.

Parameters:
rel - Relative threshold.
abs - Absolute threshold.
Throws:
NotStrictlyPositiveException - if abs <= 0.
NumberIsTooSmallException - if rel < 2 * Math.ulp(1d).
Method Detail

doOptimize

protected RealPointValuePair doOptimize()
Perform the bulk of the optimization algorithm.

Specified by:
doOptimize in class BaseAbstractScalarOptimizer<MultivariateRealFunction>
Returns:
the point/value pair giving the optimal value for the objective function.


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