166 "state of the approximation scheme is undefined");
176 "state of the approximation scheme is udefined");
243 "state of the approximation scheme is not correct : " double minEpsilonRate() const
Returns the value of the minimal epsilon rate.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
double step() const
Returns the delta time between now and the last reset() call (or the constructor).
Signaler3< Size, double, double > onProgress
Progression, error and time.
void disableMinEpsilonRate()
Disable stopping criterion on epsilon rate.
bool _enabled_max_iter
If true, the maximum iterations stopping criterion is enabled.
double maxTime() const
Returns the timeout (in seconds).
bool _enabled_eps
If true, the threshold convergence is enabled.
#define GUM_EMIT1(signal, arg1)
void enableMinEpsilonRate()
Enable stopping criterion on epsilon rate.
void _stopScheme(ApproximationSchemeSTATE new_state)
Stop the scheme given a new state.
void setPeriodSize(Size p)
How many samples between two stopping is enable.
Size remainingBurnIn()
Returns the remaining burn in.
double _current_epsilon
Current epsilon.
bool _enabled_min_rate_eps
If true, the minimal threshold for epsilon rate is enabled.
bool startOfPeriod()
Returns true if we are at the beginning of a period (compute error is mandatory). ...
void initApproximationScheme()
Initialise the scheme.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void setMinEpsilonRate(double rate)
Given that we approximate f(t), stopping criterion on d/dt(|f(t+1)-f(t)|).
void setVerbosity(bool v)
Set the verbosity on (true) or off (false).
Size periodSize() const
Returns the period size.
void setMaxTime(double timeout)
Stopping criterion on timeout.
Size _burn_in
Number of iterations before checking stopping criteria.
void disableEpsilon()
Disable stopping criterion on epsilon.
Size nbrIterations() const
Returns the number of iterations.
double _eps
Threshold for convergence.
void reset()
Reset the timer.
double _current_rate
Current rate.
double pause()
Pause the timer and return the delta (.
bool continueApproximationScheme(double error)
Update the scheme w.r.t the new error.
bool isEnabledMinEpsilonRate() const
Returns true if stopping criterion on epsilon rate is enabled, false otherwise.
Signaler1< std::string > onStop
Criteria messageApproximationScheme.
bool _enabled_max_time
If true, the timeout is enabled.
void disableMaxTime()
Disable stopping criterion on timeout.
void enableMaxIter()
Enable stopping criterion on max iterations.
void stopApproximationScheme()
Stop the approximation scheme.
Size maxIter() const
Returns the criterion on number of iterations.
Size _current_step
The current step.
std::vector< double > _history
The scheme history, used only if verbosity == true.
Size _period_size
Checking criteria frequency.
double _min_rate_eps
Threshold for the epsilon rate.
const std::vector< double > & history() const
Returns the scheme history.
ApproximationSchemeSTATE stateApproximationScheme() const
Returns the approximation scheme state.
void setMaxIter(Size max)
Stopping criterion on number of iterations.
bool isEnabledMaxIter() const
Returns true if stopping criterion on max iterations is enabled, false otherwise. ...
bool _verbosity
If true, verbosity is enabled.
bool verbosity() const
Returns true if verbosity is enabled.
std::string messageApproximationScheme() const
Returns the approximation scheme message.
double epsilon() const
Returns the value of epsilon.
double _last_epsilon
Last epsilon value.
bool isEnabledEpsilon() const
Returns true if stopping criterion on epsilon is enabled, false otherwise.
bool isEnabledMaxTime() const
Returns true if stopping criterion on timeout is enabled, false otherwise.
void setEpsilon(double eps)
Given that we approximate f(t), stopping criterion on |f(t+1)-f(t)|.
double currentTime() const
Returns the current running time in second.
void disableMaxIter()
Disable stopping criterion on max iterations.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
ApproximationSchemeSTATE
The different state of an approximation scheme.
Size _max_iter
The maximum iterations.
#define GUM_EMIT3(signal, arg1, arg2, arg3)
ApproximationSchemeSTATE _current_state
The current state.
double _max_time
The timeout.
void enableMaxTime()
Enable stopping criterion on timeout.
#define GUM_ERROR(type, msg)
void updateApproximationScheme(unsigned int incr=1)
Update the scheme w.r.t the new error and increment steps.
void enableEpsilon()
Enable stopping criterion on epsilon.