42 #include "../VectorTools.h"
52 xi_(), h_(), g_(), f1dim_(function)
62 size_t nbParams = params.
size();
70 for (
size_t i = 0; i < nbParams; i++)
81 double gg, gam, f, dgg;
99 for (
unsigned j = 0; j < n; j++)
113 if (!(std::isnan(gam) || std::isinf(gam)))
115 for (
unsigned int j = 0; j < n; j++)
129 for (
size_t i = 0; i < gradient.size(); ++i)
Partial implementation of the Optimizer interface.
OptimizationStopCondition * getDefaultStopCondition()
Get the default stop condition of the optimization algorithm.
unsigned int nbEval_
The current number of function evaluations achieved.
const ParameterList & getParameters() const
void setStopCondition(const OptimizationStopCondition &stopCondition)
Set the stop condition of the optimization algorithm.
ParameterList & getParameters_()
OptimizationStopCondition * getStopCondition()
Get the stop condition of the optimization algorithm.
bool tolIsReached_
Tell if the tolerance level has been reached.
unsigned int getVerbose() const
Get the verbose level.
void setDefaultStopCondition_(OptimizationStopCondition *osc)
std::vector< double > xi_
const DerivableFirstOrder * getFunction() const
Get the current function being optimized.
void getGradient(std::vector< double > &gradient) const
double doStep()
This function is called by the step() method and contains all calculations.
void doInit(const ParameterList ¶ms)
This function is called by the init() method and contains all calculations.
DerivableFirstOrder * getFunction_()
ConjugateGradientMultiDimensions(DerivableFirstOrder *function)
This is the abstract class for first order derivable functions.
virtual double getFirstOrderDerivative(const std::string &variable) const =0
Get the derivative of the function at the current point.
virtual void enableFirstOrderDerivatives(bool yn)=0
Tell if derivatives must be computed.
Stop condition on function value.
virtual void setParameters(const ParameterList ¶meters)=0
Set the point where the function must be computed.
virtual double f(const ParameterList ¶meters)
Get the value of the function according to a given set of parameters.
The parameter list object.