42 #include "../../Text/TextTools.h"
43 #include "../NumTools.h"
52 fold_(0), f_(0), a_(0), alam_(0), alamin_(0), alam2_(0), b_(0), disc_(0), f2_(0), rhs1_(0), rhs2_(0), slope_(slope), test_(test), tmplam_(0)
65 if (params.
size() != 1)
66 throw Exception(
"NewtonBacktrackOneDimension::init(). This optimizer only deals with one parameter.");
Partial implementation of the Optimizer interface.
OptimizationStopCondition * getDefaultStopCondition()
Get the default stop condition of the optimization algorithm.
Parameter & getParameter_(size_t i)
const ParameterList & getParameters() const
void setStopCondition(const OptimizationStopCondition &stopCondition)
Set the stop condition of the optimization algorithm.
OptimizationStopCondition * getStopCondition()
Get the stop condition of the optimization algorithm.
const Function * getFunction() const
Get the current function being optimized.
void setMaximumNumberOfEvaluations(unsigned int max)
Set the maximum number of function evaluation to perform during optimization.
bool tolIsReached_
Tell if the tolerance level has been reached.
void setDefaultStopCondition_(OptimizationStopCondition *osc)
Exception base class. Overload exception constructor (to control the exceptions mechanism)....
This is the function abstract class.
virtual double f(const ParameterList ¶meters)
Get the value of the function according to a given set of parameters.
friend class NBODStopCondition
double doStep()
This function is called by the step() method and contains all calculations.
NewtonBacktrackOneDimension(Function *function, double slope, double test)
void doInit(const ParameterList ¶ms)
This function is called by the init() method and contains all calculations.
virtual void setTolerance(double tolerance)=0
Set the tolerance parameter.
virtual double getTolerance() const =0
Get the tolerance parameter.
The parameter list object.
virtual void setValue(double value)
Set the value of this parameter.