49 xi_(), h_(), g_(), f1dim_(function)
59 size_t nbParams = params.size();
63 getFunction_()->enableFirstOrderDerivatives(
true);
64 getFunction_()->setParameters(params);
66 for(
size_t i = 0; i < nbParams; i++)
69 xi_[i] = h_[i] = g_[i];
77 double gg, gam, f, dgg;
92 for (
unsigned j = 0; j < n; j++)
105 if (!(std::isnan(gam) || std::isinf(gam)))
107 for(
unsigned int j = 0; j < n; j++)
121 for (
size_t i = 0; i < gradient.size(); ++i)
virtual double f(const ParameterList ¶meters)
Get the value of the function according to a given set of parameters.
OptimizationStopCondition * getStopCondition()
Get the stop condition of the optimization algorithm.
unsigned int getVerbose() const
Get the verbose level.
This class allows to perform a correspondence analysis.
ParameterList & getParameters_()
double doStep()
This function is called by the step() method and contains all calculations.
Stop condition on function value.
const DerivableFirstOrder * getFunction() const
Get the current function being optimized.
std::vector< double > xi_
virtual double getFirstOrderDerivative(const std::string &variable) const =0
Get the derivative of the function at the current point.
The parameter list object.
virtual void enableFirstOrderDerivatives(bool yn)=0
Tell if derivatives must be computed.
bool tolIsReached_
Tell if the tolerance level has been reached.
void setDefaultStopCondition_(OptimizationStopCondition *osc)
const ParameterList & getParameters() const
ConjugateGradientMultiDimensions(DerivableFirstOrder *function)
void doInit(const ParameterList ¶ms)
This function is called by the init() method and contains all calculations.
unsigned int nbEval_
The current number of function evaluations achieved.
Partial implementation of the Optimizer interface.
void setStopCondition(const OptimizationStopCondition &stopCondition)
Set the stop condition of the optimization algorithm.
This is the abstract class for first order derivable functions.
DerivableFirstOrder * getFunction_()
OptimizationStopCondition * getDefaultStopCondition()
Get the default stop condition of the optimization algorithm.
void getGradient(std::vector< double > &gradient) const