26 #ifndef __INNEROPTIMIZATION_HPP__ 27 #define __INNEROPTIMIZATION_HPP__ 59 void setLimits(
const vectord& down,
const vectord& up);
69 double run(vectord &Xnext);
90 double *grad,
void *my_func_data);
103 double *grad,
void *my_func_data);
109 innerOptAlgorithms alg;
110 std::vector<double> mDown, mUp;
123 { maxEvals = meval; }
127 std::copy(down.begin(),down.end(),mDown.begin());
128 std::copy(up.begin(),up.end(),mUp.begin());
133 for(
size_t i = 0; i<mDown.size();++i)
135 mDown[i] = down; mUp[i] = up;
double localTrialAround(vectord &Xnext)
Try some local optimization around a point.
Namespace of the library interface.
Abstract class for optimizable objects.
Global exploration, local refinement (hand tuned)
void setAlgorithm(innerOptAlgorithms newAlg)
Sets the optimization algorithm.
double run(vectord &Xnext)
Launch the inner optimization algorithm.
static double evaluate_nlopt_grad(unsigned int n, const double *x, double *grad, void *my_func_data)
Wrapper of inner optimization to be evaluated by NLOPT.
void setLimits(const vectord &down, const vectord &up)
Limits of the hypercube.
static double evaluate_nlopt(unsigned int n, const double *x, double *grad, void *my_func_data)
Wrapper of inner optimization to be evaluated by NLOPT.
void setMaxEvals(size_t meval)
Sets the maximum number of function evaluations.