yat
0.20.3pre
|
Wrapper class around gsl_min_fminimizer in GSL. More...
#include <yat/utility/Minimizer.h>
Classes | |
class | Interval |
class | Stopper |
Public Member Functions | |
Minimizer (const Minimizer &)=delete | |
Copy is not allowed. | |
Minimizer & | operator= (const Minimizer &)=delete |
Assignment is not allowed. | |
unsigned int | epochs (void) const |
Number of epochs (iterations) used in last minimisation. | |
template<class FUNC > | |
double | operator() (FUNC &func, double guess, double min, double max, Stopper &&stopper) |
template<class FUNC > | |
double | operator() (FUNC &func, double guess, double min, double max, Stopper &&stopper, unsigned int max_epochs) |
Protected Member Functions | |
Minimizer (const gsl_min_fminimizer_type *t) | |
Constructor. More... | |
Wrapper class around gsl_min_fminimizer in GSL.
Class is the abstract base class for several minimisation algorithms.
|
protected |
Constructor.
t | defines type of GSL minimizer |
double theplu::yat::utility::Minimizer::operator() | ( | FUNC & | func, |
double | guess, | ||
double | min, | ||
double | max, | ||
Minimizer::Stopper && | stopper | ||
) |
Function finds an x
that minimizes the function defined by func
. It calls gsl_min_fminimizer_iterate until there is no progress as defined by stopper
.
Type Requirements:
FUNC
must have an operator double operator()(double x) double theplu::yat::utility::Minimizer::operator() | ( | FUNC & | func, |
double | guess, | ||
double | min, | ||
double | max, | ||
Minimizer::Stopper && | stopper, | ||
unsigned int | max_epochs | ||
) |
Same as operator()(FUNC& func, double guess, double min, double max, Stopper&& stopper); but run at maximum max_epochs
epochs (iterations). It is the responsibility of the caller to check if maximum number of epochs has been reached, for example, with the epochs(void function.