5 #include "../../Text/TextTools.h" 6 #include "../NumTools.h" 15 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)
28 if (params.
size() != 1)
29 throw Exception(
"NewtonBacktrackOneDimension::init(). This optimizer only deals with one parameter.");
NewtonBacktrackOneDimension(std::shared_ptr< FunctionInterface > function, double slope, double test)
Constructor.
std::shared_ptr< OptimizationStopCondition > getStopCondition() override
Get the stop condition of the optimization algorithm.
void doInit(const ParameterList ¶ms)
This function is called by the init() method and contains all calculations.
void setDefaultStopCondition_(std::shared_ptr< OptimizationStopCondition > osc)
const ParameterList & getParameters() const override
The parameter list object.
bool tolIsReached_
Tell if the tolerance level has been reached.
virtual void setValue(double value)
Set the value of this parameter.
double doStep()
This function is called by the step() method and contains all calculations.
Parameter & getParameter_(size_t i)
Exception base class. Overload exception constructor (to control the exceptions mechanism). Destructor is already virtual (from std::exception)
Partial implementation of the Optimizer interface.
std::shared_ptr< const FunctionInterface > getFunction() const override
Get the current function being optimized.
void setMaximumNumberOfEvaluations(unsigned int max) override
Set the maximum number of function evaluation to perform during optimization.
std::shared_ptr< OptimizationStopCondition > getDefaultStopCondition() override
Get the default stop condition of the optimization algorithm.
void setStopCondition(std::shared_ptr< OptimizationStopCondition > stopCondition) override
Set the stop condition of the optimization algorithm.