21 #ifndef SELDON_COMPUTATION_OPTIMIZATION_NLOPTSOLVER_HXX
22 #define SELDON_COMPUTATION_OPTIMIZATION_NLOPTSOLVER_HXX
73 void Initialize(
int Nparameter,
string algorithm,
74 double parameter_tolerance = 1.e-6,
75 double cost_function_tolerance = 1.e-6,
76 int Niteration_max = -1);
87 void Optimize(cost_ptr cost,
void* argument);
void GetParameter(Vector< double > ¶meter) const
Gets the parameters.
void GetParameterTolerance(double &) const
Gets the relative tolerance on the parameters.
double cost_function_tolerance_
Relative tolerance on the cost function.
void GetCostFunctionTolerance(double &) const
Gets the relative tolerance on the cost function.
void SetCostFunctionTolerance(double)
Sets the relative tolerance on the cost function.
void SetLowerBound(const Vector< double > &)
Sets lower bounds on the parameters.
void SetParameterTolerance(double)
Sets the relative tolerance on the parameters.
~NLoptSolver()
Destructor.
nlopt::SeldonOpt opt_
NLopt optimization solver.
void Optimize(cost_ptr cost, void *argument)
Optimization.
Vector< double > gradient_
The vector that stores gradient values. Before optimization, unspecified; after optimization,...
void GetNiterationMax(int &) const
Gets the maximum number of cost function evaluations.
void SetParameter(const Vector< double > ¶meter)
Sets the parameters.
double GetCost() const
Returns the value of the cost function.
void SetUpperBound(const Vector< double > &)
Sets upper bounds on the parameters.
NLoptSolver()
Default constructor.
double cost_
The value of cost function for given parameter values.
double parameter_tolerance_
Relative tolerance on the optimization parameters.
void SetNiterationMax(int)
Sets the maximum number of cost function evaluations.
Vector< double > parameter_
The vector that stores parameters values. Before optimization, stores the initial parameter vector; a...
nlopt::algorithm algorithm_
Optimization algorithm.
void Initialize(int Nparameter, string algorithm, double parameter_tolerance=1.e-6, double cost_function_tolerance=1.e-6, int Niteration_max=-1)
Initializations.
int Niteration_max_
Maximum number of function evaluations. It is ignored if it is non-positive.