yat
0.20.3pre
|
#include <yat/utility/GoldenSection.h>
Public Member Functions | |
GoldenSection (void) | |
Constructor. | |
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) |
Wrapper around gsl_min_fminimizer_goldensection
|
inherited |
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)
|
inherited |
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.