24 const double x =
xx[0];
25 const double y =
xx[1];
27 const double tmp2 = 1-
x;
50 std::cerr <<
"Error: cannot create minimizer \"" <<
minName
51 <<
"\". Maybe the required library was not built?" << std::endl;
56 minimum->SetMaxFunctionCalls(1000000);
57 minimum->SetMaxIterations(10000);
64 double step[2] = {0.01,0.01};
67 double variable[2] = { -1.,1.2};
70 variable[0] =
r.Uniform(-20,20);
71 variable[1] =
r.Uniform(-20,20);
77 minimum->SetVariable(0,
"x",variable[0], step[0]);
78 minimum->SetVariable(1,
"y",variable[1], step[1]);
84 std::cout <<
"Minimum: f(" <<
xs[0] <<
"," <<
xs[1] <<
"): "
85 <<
minimum->MinValue() << std::endl;
88 if (
minimum->MinValue() < 1.E-4 )
90 <<
" converged to the right minimum" << std::endl;
93 <<
" failed to converge !!!" << std::endl;
94 Error(
"NumericalMinimization",
"fail to converge");
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
static ROOT::Math::Minimizer * CreateMinimizer(const std::string &minimizerType="", const std::string &algoType="")
static method to create the corresponding Minimizer given the string Supported Minimizers types are: ...
Documentation for class Functor class.
Abstract Minimizer class, defining the interface for the various minimizer (like Minuit2,...
Random number generator class based on the maximally quidistributed combined Tausworthe generator by ...