bpp-core3
3.0.0
|
Tools of one parameter-functions optimizations. More...
#include <Bpp/Numeric/Function/OneDimensionOptimizationTools.h>
Public Member Functions | |
OneDimensionOptimizationTools () | |
virtual | ~OneDimensionOptimizationTools () |
Static Public Member Functions | |
static Bracket | bracketMinimum (double a, double b, FunctionInterface &function, ParameterList parameters) |
Bracket a minimum. More... | |
static Bracket | inwardBracketMinimum (double a, double b, FunctionInterface &function, ParameterList parameters, unsigned int intervalsNum=10) |
Bracket a minimum by a search within the parameter's bounds. More... | |
static unsigned int | lineMinimization (std::shared_ptr< DirectionFunction > f1dim, ParameterList ¶meters, std::vector< double > &xi, double tolerance, std::shared_ptr< OutputStream > profiler=nullptr, std::shared_ptr< OutputStream > messenger=nullptr, unsigned int verbose=2) |
static unsigned int | lineSearch (std::shared_ptr< DirectionFunction > f1dim, ParameterList ¶meters, std::vector< double > &xi, std::vector< double > &gradient, std::shared_ptr< OutputStream > profiler=nullptr, std::shared_ptr< OutputStream > messenger=nullptr, unsigned int verbose=2) |
Search a 'sufficiently low' value for a function in a given direction. More... | |
Static Public Attributes | |
static double | GLIMIT = 100.0 |
Maximum magnification allowed for a parabolic-fit step. More... | |
Tools of one parameter-functions optimizations.
For now, contains only one method to bracket a minimum.
Definition at line 57 of file OneDimensionOptimizationTools.h.
|
inline |
Definition at line 60 of file OneDimensionOptimizationTools.h.
|
inlinevirtual |
Definition at line 61 of file OneDimensionOptimizationTools.h.
|
static |
Bracket a minimum.
Given a function func, and given distinct initial points x1 and x2, this routine searches in the downhill direction (defined by the function as evaluated at the initial points) and returns a Bracket object with new points a.x, b.x and c.x that bracket a minimum of the function. Also returned are the function values at the three points, a.f, b.f and c.f.
a,b | Two initial values for the parameter. |
function | The function to bracket. |
parameters | The parameter to use as a variable. |
Definition at line 28 of file OneDimensionOptimizationTools.cpp.
References bpp::Bracket::a, bpp::NumTools::abs(), bpp::Bracket::b, bpp::Bracket::c, bpp::BracketPoint::f, bpp::NumConstants::GOLDEN_RATIO_PHI(), bpp::NumTools::max(), bpp::Bracket::setA(), bpp::Bracket::setB(), bpp::Bracket::setC(), bpp::NumTools::sign(), bpp::NumConstants::VERY_TINY(), and bpp::BracketPoint::x.
Referenced by bpp::GoldenSectionSearch::doInit(), and bpp::BrentOneDimension::doInit().
|
static |
Bracket a minimum by a search within the parameter's bounds.
This implementation follows numerical recipes, page 352, inwards bracketing
a,b | Two initial values for the parameter. |
function | The function to bracket. |
parameters | The parameter to use as a variable. |
intervalsNum | number of segments in which [a;b] is splitted. |
Definition at line 126 of file OneDimensionOptimizationTools.cpp.
References bpp::Bracket::a, bpp::Bracket::b, bpp::Bracket::c, bpp::BracketPoint::f, and bpp::BracketPoint::x.
Referenced by bpp::BrentOneDimension::doInit().
|
static |
Definition at line 173 of file OneDimensionOptimizationTools.cpp.
References bpp::ParameterList::addParameter(), bpp::AutoParameter::CONSTRAINTS_AUTO, bpp::AutoParameter::CONSTRAINTS_KEEP, bpp::AbstractOptimizer::getNumberOfEvaluations(), bpp::AbstractOptimizer::getStopCondition(), bpp::AbstractOptimizer::init(), bpp::BrentOneDimension::optimize(), bpp::AbstractOptimizer::setConstraintPolicy(), bpp::BrentOneDimension::setInitialInterval(), bpp::AbstractOptimizer::setMessageHandler(), bpp::AbstractOptimizer::setOptimizationProgressCharacter(), bpp::AbstractOptimizer::setProfiler(), bpp::AbstractOptimizer::setVerbose(), and bpp::ParameterList::size().
Referenced by bpp::ConjugateGradientMultiDimensions::doStep(), and bpp::PowellMultiDimensions::doStep().
|
static |
Search a 'sufficiently low' value for a function in a given direction.
This function performs a similar computation as the lnsrch function defined at page 385 of
NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)
without the stpmax argument, since the steps are bounded in another way.
Definition at line 215 of file OneDimensionOptimizationTools.cpp.
References bpp::ParameterList::addParameter(), bpp::AutoParameter::CONSTRAINTS_AUTO, bpp::AutoParameter::CONSTRAINTS_KEEP, bpp::AbstractOptimizer::getNumberOfEvaluations(), bpp::AbstractOptimizer::getStopCondition(), GLIMIT, bpp::AbstractOptimizer::init(), bpp::AbstractOptimizer::optimize(), bpp::AbstractOptimizer::setConstraintPolicy(), bpp::AbstractOptimizer::setMessageHandler(), bpp::AbstractOptimizer::setOptimizationProgressCharacter(), bpp::AbstractOptimizer::setProfiler(), bpp::AbstractOptimizer::setVerbose(), and bpp::ParameterList::size().
Referenced by bpp::BfgsMultiDimensions::doStep().
|
static |
Maximum magnification allowed for a parabolic-fit step.
Definition at line 129 of file OneDimensionOptimizationTools.h.
Referenced by lineSearch().