25 const double x =
xx[0];
26 const double y =
xx[1];
28 const double tmp2 = 1-
x;
51 std::cerr <<
"Error: cannot create minimizer \"" <<
minName
52 <<
"\". Maybe the required library was not built?" << std::endl;
57 minimum->SetMaxFunctionCalls(1000000);
58 minimum->SetMaxIterations(10000);
65 double step[2] = {0.01,0.01};
68 double variable[2] = { -1.,1.2};
71 variable[0] =
r.Uniform(-20,20);
72 variable[1] =
r.Uniform(-20,20);
78 minimum->SetVariable(0,
"x",variable[0], step[0]);
79 minimum->SetVariable(1,
"y",variable[1], step[1]);
85 std::cout <<
"Minimum: f(" <<
xs[0] <<
"," <<
xs[1] <<
"): "
86 <<
minimum->MinValue() << std::endl;
89 if (
minimum->MinValue() < 1.E-4 )
91 <<
" converged to the right minimum" << std::endl;
94 <<
" failed to converge !!!" << std::endl;
95 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 equidistributed combined Tausworthe generator by...