|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.math.optimization.univariate.AbstractUnivariateRealOptimizer
public abstract class AbstractUnivariateRealOptimizer
Provide a default implementation for several functions useful to generic optimizers.
| Constructor Summary | |
|---|---|
AbstractUnivariateRealOptimizer()
|
|
| Method Summary | |
|---|---|
protected double |
computeObjectiveValue(double point)
Compute the objective function value. |
protected abstract UnivariateRealPointValuePair |
doOptimize()
Method for implementing actual optimization algorithms in derived classes. |
ConvergenceChecker<UnivariateRealPointValuePair> |
getConvergenceChecker()
Get the convergence checker. |
int |
getEvaluations()
Get the number of evaluations of the objective function. |
GoalType |
getGoalType()
|
double |
getMax()
|
int |
getMaxEvaluations()
Get the maximal number of function evaluations. |
double |
getMin()
|
double |
getStartValue()
|
UnivariateRealPointValuePair |
optimize(int maxEval,
UnivariateRealFunction f,
GoalType goalType,
double min,
double max)
Find an optimum in the given interval. |
UnivariateRealPointValuePair |
optimize(int maxEval,
UnivariateRealFunction f,
GoalType goalType,
double min,
double max,
double startValue)
Find an optimum in the given interval, start at startValue. |
void |
setConvergenceChecker(ConvergenceChecker<UnivariateRealPointValuePair> c)
Set the convergence checker. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractUnivariateRealOptimizer()
| Method Detail |
|---|
public int getMaxEvaluations()
getMaxEvaluations in interface BaseOptimizer<UnivariateRealPointValuePair>public int getEvaluations()
optimize method. It is 0 if the method has not been
called yet.
getEvaluations in interface BaseOptimizer<UnivariateRealPointValuePair>public GoalType getGoalType()
public double getMin()
public double getMax()
public double getStartValue()
protected double computeObjectiveValue(double point)
point - Point at which the objective function must be evaluated.
TooManyEvaluationsException - if the maximal number of evaluations
is exceeded.
public UnivariateRealPointValuePair optimize(int maxEval,
UnivariateRealFunction f,
GoalType goalType,
double min,
double max,
double startValue)
optimize in interface BaseUnivariateRealOptimizer<UnivariateRealFunction>maxEval - Maximum number of function evaluations.f - Function to optimize.goalType - Type of optimization goal: either
GoalType.MAXIMIZE or GoalType.MINIMIZE.min - Lower bound for the interval.max - Upper bound for the interval.startValue - Start value to use.
public UnivariateRealPointValuePair optimize(int maxEval,
UnivariateRealFunction f,
GoalType goalType,
double min,
double max)
optimize in interface BaseUnivariateRealOptimizer<UnivariateRealFunction>maxEval - Maximum number of function evaluations.f - Function to optimize.goalType - Type of optimization goal: either
GoalType.MAXIMIZE or GoalType.MINIMIZE.min - Lower bound for the interval.max - Upper bound for the interval.
public void setConvergenceChecker(ConvergenceChecker<UnivariateRealPointValuePair> c)
setConvergenceChecker in interface BaseOptimizer<UnivariateRealPointValuePair>c - Object to use to check for convergence.public ConvergenceChecker<UnivariateRealPointValuePair> getConvergenceChecker()
getConvergenceChecker in interface BaseOptimizer<UnivariateRealPointValuePair>protected abstract UnivariateRealPointValuePair doOptimize()
TooManyEvaluationsException - if the maximal number of evaluations
is exceeded.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||