52 : fRootMin( rootMin ),
54 fMaxIter( maxIterations ),
55 fAbsTol ( absTolerance ),
75 Double_t fa = fMethod->GetValueForRoot( a ) - refValue;
76 Double_t fb = fMethod->GetValueForRoot( b ) - refValue;
78 Log() << kWARNING <<
"<Root> initial interval w/o root: "
79 <<
"(a=" << a <<
", b=" << b <<
"),"
80 <<
" (Eff_a=" << fMethod->GetValueForRoot( a )
81 <<
", Eff_b=" << fMethod->GetValueForRoot( b ) <<
"), "
82 <<
"(fa=" << fa <<
", fb=" << fb <<
"), "
83 <<
"refValue = " << refValue <<
Endl;
90 for (
Int_t iter= 0; iter <= fMaxIter; iter++) {
91 if ((fb < 0 && fc < 0) || (fb > 0 && fc > 0)) {
102 fa = fb; fb =
fc; fc = fa;
116 if (ac_equal) { p = 2 * m * s; q = 1 - s; }
118 q = fa /
fc; r = fb /
fc;
119 p = s * (2 * m * q * (q -
r) - (b - a) * (r - 1));
120 q = (q - 1) * (r - 1) * (s - 1);
128 if (2 * p < (min1 < min2 ? min1 : min2)) {
132 else { d =
m;
e =
m; }
138 else b += (m > 0 ? +tol : -
tol);
140 fb = fMethod->GetValueForRoot( b ) - refValue;
145 Log() << kWARNING <<
"<Root> maximum iterations (" << fMaxIter
146 <<
") reached before convergence" <<
Endl;
MsgLogger & Endl(MsgLogger &ml)
Virtual base Class for all MVA method.
static struct mg_connection * fc(struct mg_context *ctx)
Double_t Root(Double_t refValue)
Root finding using Brents algorithm; taken from CERNLIB function RZERO.
virtual ~RootFinder(void)
destructor
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
ostringstream derivative to redirect and format output
Root finding using Brents algorithm (translated from CERNLIB function RZERO)
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b