56 for (
unsigned int i = 0; i <
nbParams_; i++)
65 double t = std::max(0.000001, std::min(std::abs(v),
getStopCondition()->getTolerance()));
virtual bool matchParametersValues(const ParameterList ¶ms, std::vector< size_t > *updatedParameters=0)
Update the parameters from params.
std::shared_ptr< OptimizationStopCondition > getStopCondition() override
Get the stop condition of the optimization algorithm.
void setVerbose(unsigned int v) override
Set the verbose level.
void setConstraintPolicy(const std::string &constraintPolicy) override
Set the constraint policy for this optimizer.
void setDefaultStopCondition_(std::shared_ptr< OptimizationStopCondition > osc)
ParameterList & getParameters_()
const ParameterList & getParameters() const override
unsigned int getNumberOfEvaluations() const override
Get the number of function evaluations performed since the call of the init function.
void doInit(const ParameterList ¶ms) override
This function is called by the init() method and contains all calculations.
std::shared_ptr< OutputStream > getProfiler() const override
std::string getConstraintPolicy() const override
Get the constraint policy for this optimizer.
The parameter list object.
void setMessageHandler(std::shared_ptr< OutputStream > mh) override
Set the message handler for this optimizer.
bool tolIsReached_
Tell if the tolerance level has been reached.
void setOptimizationProgressCharacter(const std::string &c)
Set the character to be displayed during optimization.
unsigned int getVerbose() const override
Get the verbose level.
void setProfiler(std::shared_ptr< OutputStream > profiler) override
Set the profiler for this optimizer.
void setFunction(std::shared_ptr< FunctionInterface > function) override
Set the function to optimize.
double doStep() override
This function is called by the step() method and contains all calculations.
double optimize()
Initialize optimizer.
void setFunction(std::shared_ptr< FunctionInterface > function) override
Set the function to optimize.
unsigned int nbEvalMax_
The maximum number of function evaluations allowed.
unsigned int nbEval_
The current number of function evaluations achieved.
Partial implementation of the Optimizer interface.
BrentOneDimension optimizer_
SimpleMultiDimensions(std::shared_ptr< FunctionInterface > function)
void setInitialInterval(double inf, double sup)
Set intial search interval.
std::shared_ptr< OutputStream > getMessageHandler() const override
std::shared_ptr< const FunctionInterface > getFunction() const override
Get the current function being optimized.
void init(const ParameterList ¶ms) override
Basic implementation.
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.