23 #ifndef O2SCL_MIN_BRENT_BOOST_H
24 #define O2SCL_MIN_BRENT_BOOST_H
30 #include <boost/math/tools/minima.hpp>
32 #include <o2scl/min.h>
34 #ifndef DOXYGEN_NO_O2NS
57 std::pair<double,double> res;
59 if (this->
tol_rel>1.0) digits=1;
60 else if (this->
tol_rel<=0.0) digits=18;
61 else digits=((size_t)(-log10(this->
tol_rel)));
62 res=boost::math::tools::brent_find_minima(func,x1,x3,digits);
69 virtual const char *
type() {
return "min_brent_boost"; }
73 #ifndef DOXYGEN_NO_O2NS
One-dimensional bracketing minimization [abstract base].
double tol_rel
The tolerance for the minimum function value.
virtual const char * type()
Return string denoting type ("min_brent_boost")
virtual int min_bkt(double &x2, double x1, double x3, double &fmin, func_t &func)
Calculate the minimum fmin of func with x2 bracketed between x1 and x3.
static const double x3[11]
One-dimensional minimization using Brent's method (GSL)
static const double x2[5]
static const double x1[5]