42 #include "../VectorTools.h" 43 #include "../NumTools.h" 53 lastParametersEstimates_(),
54 newParametersEstimates_()
59 cout <<
"DEBUG: WARNING!!! No parameter passed to ParametersStopCondition constructor. " 60 <<
"Be sure to have initialized the Optimizer first!" << endl;
68 lastParametersEstimates_(),
69 newParametersEstimates_()
74 cout <<
"DEBUG: WARNING!!! No parameter passed to ParametersStopCondition constructor. " 75 <<
"Be sure to have initialized the Optimizer first!" << endl;
83 lastParametersEstimates_(),
84 newParametersEstimates_()
89 cout <<
"DEBUG: WARNING!!! No parameter passed to ParametersStopCondition constructor. " 90 <<
"Be sure to have initialized the Optimizer first!" << endl;
99 lastParametersEstimates_(),
100 newParametersEstimates_()
105 cout <<
"DEBUG: WARNING!!! No parameter passed to ParametersStopCondition constructor. " 106 <<
"Be sure to have initialized the Optimizer first!" << endl;
132 double tol = NumTools::abs<double>(newEstimate - lastEstimate);
152 double tol = NumTools::abs<double>(newEstimate - lastEstimate);
167 lastFunctionValue_(-log(0.)),
168 newFunctionValue_(-log(0.))
177 lastFunctionValue_(-log(0.)),
178 newFunctionValue_(-log(0.))
187 lastFunctionValue_(-log(0.)),
188 newFunctionValue_(-log(0.))
198 lastFunctionValue_(-log(0.)),
199 newFunctionValue_(-log(0.))
double lastFunctionValue_
The last value of the function.
FunctionStopCondition(const Optimizer *optimizer)
virtual const ParameterList & getParameters() const =0
This class allows to perform a correspondence analysis.
virtual const Function * getFunction() const =0
Get the current function being optimized.
This class is designed to facilitate the manipulation of parameters.
double getCurrentTolerance() const
Get the current tolerance.
virtual double getFunctionValue() const =0
Get the current function value.
void init()
Initialize the condition.
double newFunctionValue_
The new value of the function.
void init()
Initialize the condition.
virtual ~FunctionStopCondition()
virtual const std::string & getName() const
Get the name of this parameter.
bool isToleranceReached() const
Tell if the we reached the desired tolerance with a given new set of estimates.
double callCount_
Count the number of times the isToleranceReached() function has been called.
virtual const Parameter & getParameter(const std::string &name) const
Get the parameter with name name.
virtual double getValue() const
Get the value of this parameter.
Partial implementation of the OptimizationStopCondition interface.
This is the basal interface for all optimization methods.
const Optimizer * optimizer_