org.apache.commons.math.optimization.univariate
Class BrentOptimizer
java.lang.Object
org.apache.commons.math.ConvergingAlgorithmImpl
org.apache.commons.math.optimization.univariate.AbstractUnivariateRealOptimizer
org.apache.commons.math.optimization.univariate.BrentOptimizer
- All Implemented Interfaces:
- ConvergingAlgorithm, UnivariateRealOptimizer
public class BrentOptimizer
- extends AbstractUnivariateRealOptimizer
Implements Richard Brent's algorithm (from his book "Algorithms for
Minimization without Derivatives", p. 79) for finding minima of real
univariate functions. This implementation is an adaptation partly
based on the Python code from SciPy (module "optimize.py" v0.5).
- Since:
- 2.0
- Version:
- $Revision: 1070725 $ $Date: 2011-02-15 02:31:12 +0100 (mar. 15 févr. 2011) $
Method Summary |
protected double |
doOptimize()
Method for implementing actual optimization algorithms in derived
classes. |
Methods inherited from class org.apache.commons.math.optimization.univariate.AbstractUnivariateRealOptimizer |
checkResultComputed, clearResult, computeObjectiveValue, computeObjectiveValue, getEvaluations, getFunctionValue, getGoalType, getMax, getMaxEvaluations, getMin, getResult, getStartValue, optimize, optimize, setFunctionValue, setMaxEvaluations, setResult |
Methods inherited from class org.apache.commons.math.ConvergingAlgorithmImpl |
getAbsoluteAccuracy, getIterationCount, getMaximalIterationCount, getRelativeAccuracy, incrementIterationsCounter, resetAbsoluteAccuracy, resetIterationsCounter, resetMaximalIterationCount, resetRelativeAccuracy, setAbsoluteAccuracy, setMaximalIterationCount, setRelativeAccuracy |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BrentOptimizer
public BrentOptimizer()
- Construct a solver.
doOptimize
protected double doOptimize()
throws MaxIterationsExceededException,
FunctionEvaluationException
- Method for implementing actual optimization algorithms in derived
classes.
From version 3.0 onwards, this method will be abstract - i.e.
concrete implementations will have to implement it. If this method
is not implemented, subclasses must override
AbstractUnivariateRealOptimizer.optimize(UnivariateRealFunction, GoalType, double, double)
.
- Overrides:
doOptimize
in class AbstractUnivariateRealOptimizer
- Returns:
- the optimum.
- Throws:
MaxIterationsExceededException
- if the maximum iteration count
is exceeded.
FunctionEvaluationException
- if an error occurs evaluating
the function.
Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.