Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
BrentMethods.cxx File Reference
#include "Math/BrentMethods.h"
#include "Math/IFunction.h"
#include "Math/IFunctionfwd.h"
#include <cmath>
#include <algorithm>
#include "Math/Util.h"
#include "Math/Error.h"
#include <iostream>
Include dependency graph for BrentMethods.cxx:

Namespaces

namespace  ROOT
 tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tbb::task_arena without forward declaring tbb::interface7
 
namespace  ROOT::Math
 
namespace  ROOT::Math::BrentMethods
 

Functions

double ROOT::Math::BrentMethods::MinimBrent (const IGenFunction *f, int type, double &xmin, double &xmax, double xmiddle, double fy, bool &ok, int &niter, double epsabs=1.E-8, double epsrel=1.E-10, int maxiter=100)
 Finds a minimum of a function, if the function is unimodal between xmin and xmax This method uses a combination of golden section search and parabolic interpolation Details about convergence and properties of this algorithm can be found in the book by R.P.Brent "Algorithms for Minimization Without Derivatives" or in the "Numerical Recipes", chapter 10.2 convergence is reached using tolerance = 2 *( epsrel * abs(x) + epsabs)
 
double ROOT::Math::BrentMethods::MinimStep (const IGenFunction *f, int type, double &xmin, double &xmax, double fy, int npx=100, bool useLog=false)
 Grid search implementation, used to bracket the minimum and later use Brent's method with the bracketed interval The step of the search is set to (xmax-xmin)/fNpx type: 0-returns MinimumX 1-returns Minimum 2-returns MaximumX 3-returns Maximum 4-returns X corresponding to fy.