yat  0.20.3pre
Public Member Functions | List of all members
theplu::yat::utility::GoldenSection Class Reference

#include <yat/utility/GoldenSection.h>

Inheritance diagram for theplu::yat::utility::GoldenSection:
theplu::yat::utility::Minimizer

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)
 

Detailed Description

Wrapper around gsl_min_fminimizer_goldensection

Since
New in yat 0.20

Member Function Documentation

◆ operator()() [1/2]

template<class FUNC >
double theplu::yat::utility::Minimizer::operator() ( FUNC &  func,
double  guess,
double  min,
double  max,
Minimizer::Stopper &&  stopper 
)
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)

◆ operator()() [2/2]

template<class FUNC >
double theplu::yat::utility::Minimizer::operator() ( FUNC &  func,
double  guess,
double  min,
double  max,
Minimizer::Stopper &&  stopper,
unsigned int  max_epochs 
)
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.


The documentation for this class was generated from the following file:

Generated on Sat Feb 18 2023 03:31:45 for yat by  doxygen 1.8.14