41 #include "../NumTools.h" 42 #include "../../Text/TextTools.h" 50 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)
63 if(params.size() != 1)
throw Exception(
"NewtonBacktrackOneDimension::init(). This optimizer only deals with one parameter.");
64 fold_ = getFunction()->f(getParameters());
65 getStopCondition()->setTolerance(getStopCondition()->getTolerance()/test_);
66 alamin_=getStopCondition()->getTolerance();
friend class NBODStopCondition
virtual double f(const ParameterList ¶meters)
Get the value of the function according to a given set of parameters.
This class allows to perform a correspondence analysis.
This is the function abstract class.
void doInit(const ParameterList ¶ms)
This function is called by the init() method and contains all calculations.
void setMaximumNumberOfEvaluations(unsigned int max)
Set the maximum number of function evaluation to perform during optimization.
The parameter list object.
NewtonBacktrackOneDimension(Function *function, double slope, double test)
bool tolIsReached_
Tell if the tolerance level has been reached.
virtual void setValue(double value)
Set the value of this parameter.
void setDefaultStopCondition_(OptimizationStopCondition *osc)
double doStep()
This function is called by the step() method and contains all calculations.
Parameter & getParameter_(size_t i)
const Function * getFunction() const
Get the current function being optimized.
const ParameterList & getParameters() const
Partial implementation of the Optimizer interface.
void setStopCondition(const OptimizationStopCondition &stopCondition)
Set the stop condition of the optimization algorithm.
OptimizationStopCondition * getDefaultStopCondition()
Get the default stop condition of the optimization algorithm.