yat  0.21pre
Public Member Functions | List of all members
theplu::yat::utility::BrentMinimizer Class Reference

#include <yat/utility/BrentMinimizer.h>

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

Public Member Functions

 BrentMinimizer (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_brent

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 Wed Jan 25 2023 03:34:29 for yat by  doxygen 1.8.14