org.apache.commons.math3.optimization.direct
Class BaseAbstractMultivariateSimpleBoundsOptimizer<FUNC extends MultivariateFunction>

java.lang.Object
  extended by org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer<FUNC>
      extended by org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateSimpleBoundsOptimizer<FUNC>
Type Parameters:
FUNC - Type of the objective function to be optimized.
All Implemented Interfaces:
BaseMultivariateOptimizer<FUNC>, BaseMultivariateSimpleBoundsOptimizer<FUNC>, BaseOptimizer<PointValuePair>
Direct Known Subclasses:
BOBYQAOptimizer, CMAESOptimizer

public abstract class BaseAbstractMultivariateSimpleBoundsOptimizer<FUNC extends MultivariateFunction>
extends BaseAbstractMultivariateOptimizer<FUNC>
implements BaseMultivariateOptimizer<FUNC>, BaseMultivariateSimpleBoundsOptimizer<FUNC>

Base class for implementing optimizers for multivariate scalar functions, subject to simple bounds: The valid range of the parameters is an interval. The interval can possibly be infinite (in one or both directions). This base class handles the boiler-plate methods associated to thresholds settings, iterations and evaluations counting.

Since:
3.0
Version:
$Id$

Field Summary
private  double[] lowerBound
          Lower bounds.
private  double[] upperBound
          Upper bounds.
 
Fields inherited from class org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer
evaluations
 
Constructor Summary
protected BaseAbstractMultivariateSimpleBoundsOptimizer()
          Simple constructor with default settings.
protected BaseAbstractMultivariateSimpleBoundsOptimizer(ConvergenceChecker<PointValuePair> checker)
           
 
Method Summary
 double[] getLowerBound()
           
 double[] getUpperBound()
           
 PointValuePair optimize(int maxEval, FUNC f, GoalType goalType, double[] startPoint)
          Optimize an objective function.
 PointValuePair optimize(int maxEval, FUNC f, GoalType goalType, double[] startPoint, double[] lower, double[] upper)
          Optimize an objective function.
 
Methods inherited from class org.apache.commons.math3.optimization.direct.BaseAbstractMultivariateOptimizer
computeObjectiveValue, doOptimize, getConvergenceChecker, getEvaluations, getGoalType, getMaxEvaluations, getStartPoint
 
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.math3.optimization.BaseOptimizer
getConvergenceChecker, getEvaluations, getMaxEvaluations
 

Field Detail

lowerBound

private double[] lowerBound
Lower bounds.


upperBound

private double[] upperBound
Upper bounds.

Constructor Detail

BaseAbstractMultivariateSimpleBoundsOptimizer

protected BaseAbstractMultivariateSimpleBoundsOptimizer()
Simple constructor with default settings. The convergence checker is set to a SimpleValueChecker and the allowed number of evaluations is set to Integer.MAX_VALUE.

See Also:
BaseAbstractMultivariateOptimizer.BaseAbstractMultivariateOptimizer()

BaseAbstractMultivariateSimpleBoundsOptimizer

protected BaseAbstractMultivariateSimpleBoundsOptimizer(ConvergenceChecker<PointValuePair> checker)
Parameters:
checker - Convergence checker.
Method Detail

getLowerBound

public double[] getLowerBound()
Returns:
the lower bounds.

getUpperBound

public double[] getUpperBound()
Returns:
the upper bounds.

optimize

public PointValuePair optimize(int maxEval,
                               FUNC f,
                               GoalType goalType,
                               double[] startPoint)
Optimize an objective function.

Specified by:
optimize in interface BaseMultivariateOptimizer<FUNC extends MultivariateFunction>
Overrides:
optimize in class BaseAbstractMultivariateOptimizer<FUNC extends MultivariateFunction>
Parameters:
maxEval - Maximum number of function evaluations.
f - Objective function.
goalType - Type of optimization goal: either GoalType.MAXIMIZE or GoalType.MINIMIZE.
startPoint - Start point for optimization.
Returns:
the point/value pair giving the optimal value for objective function.

optimize

public PointValuePair optimize(int maxEval,
                               FUNC f,
                               GoalType goalType,
                               double[] startPoint,
                               double[] lower,
                               double[] upper)
Optimize an objective function.

Specified by:
optimize in interface BaseMultivariateSimpleBoundsOptimizer<FUNC extends MultivariateFunction>
Parameters:
maxEval - Maximum number of function evaluations.
f - Objective function.
goalType - Type of optimization goal: either GoalType.MAXIMIZE or GoalType.MINIMIZE.
startPoint - Start point for optimization.
lower - Lower bound for each of the parameters.
upper - Upper bound for each of the parameters.
Returns:
the point/value pair giving the optimal value for objective function.


Copyright (c) 2003-2013 Apache Software Foundation