Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RootFinder.h
Go to the documentation of this file.
1// @(#)root/tmva $Id$
2// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
3
4/**********************************************************************************
5 * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6 * Package: TMVA *
7 * Class : RootFinder *
8 * *
9 * *
10 * Description: *
11 * Root finding using Brents algorithm *
12 * (translated from CERNLIB function RZERO) *
13 * *
14 * Authors (alphabetical): *
15 * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
16 * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, Germany *
17 * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
18 * *
19 * Copyright (c) 2005: *
20 * CERN, Switzerland *
21 * U. of Victoria, Canada *
22 * MPI-K Heidelberg, Germany *
23 * *
24 * Redistribution and use in source and binary forms, with or without *
25 * modification, are permitted according to the terms listed in LICENSE *
26 * (see tmva/doc/LICENSE) *
27 **********************************************************************************/
28
29#ifndef ROOT_TMVA_RootFinder
30#define ROOT_TMVA_RootFinder
31
32//////////////////////////////////////////////////////////////////////////
33// //
34// RootFinder //
35// //
36// Root finding using Brents algorithm //
37// (translated from CERNLIB function RZERO) //
38// //
39//////////////////////////////////////////////////////////////////////////
40
41#include "TObject.h"
42
43namespace TMVA {
44
45 class MsgLogger;
46 class MethodBase;
47
48 class RootFinder : public TObject {
49
50 public:
51
52 RootFinder( MethodBase *method,
53 Double_t rootMin, Double_t rootMax,
54 Int_t maxIterations = 100,
55 Double_t absTolerance = 0.0 );
56 virtual ~RootFinder( void );
57
58 // returns the root of the function
59 Double_t Root( Double_t refValue );
60
61 private:
62
63 Double_t fRootMin; ///< minimum root value
64 Double_t fRootMax; ///< maximum root value
65 Int_t fMaxIter; ///< maximum number of iterations
66 Double_t fAbsTol; ///< absolute tolerance deviation
67
68 // Methods pointer
70
71 mutable MsgLogger* fLogger; ///<! message logger
72 MsgLogger& Log() const { return *fLogger; }
73
74 ClassDef(RootFinder,0); // Root finding using Brents algorithm
75 };
76
77} // namespace TMVA
78
79#endif
#define ClassDef(name, id)
Definition Rtypes.h:337
Virtual base Class for all MVA method.
Definition MethodBase.h:111
ostringstream derivative to redirect and format output
Definition MsgLogger.h:57
Root finding using Brents algorithm (translated from CERNLIB function RZERO)
Definition RootFinder.h:48
MsgLogger & Log() const
Definition RootFinder.h:72
Double_t fRootMax
maximum root value
Definition RootFinder.h:64
virtual ~RootFinder(void)
destructor
MsgLogger * fLogger
! message logger
Definition RootFinder.h:71
Double_t fRootMin
minimum root value
Definition RootFinder.h:63
Double_t Root(Double_t refValue)
Root finding using Brents algorithm; taken from CERNLIB function RZERO.
Double_t fAbsTol
absolute tolerance deviation
Definition RootFinder.h:66
Int_t fMaxIter
maximum number of iterations
Definition RootFinder.h:65
MethodBase * fMethod
Definition RootFinder.h:69
Mother of all ROOT objects.
Definition TObject.h:41
create variable transformations