ROOT
6.07/01
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
tmva
tmva
inc
TMVA
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
* Web : http://tmva.sourceforge.net *
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
* (http://tmva.sourceforge.net/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
#ifndef ROOT_TObject
42
#include "
TObject.h
"
43
#endif
44
45
namespace
TMVA {
46
47
class
MsgLogger;
48
49
class
RootFinder
:
public
TObject
{
50
51
public
:
52
53
RootFinder
(
Double_t
(*rootVal)(
Double_t
),
54
Double_t
rootMin,
Double_t
rootMax,
55
Int_t
maxIterations = 100,
56
Double_t
absTolerance = 0.0 );
57
virtual
~RootFinder
(
void
);
58
59
// returns the root of the function
60
Double_t
Root
(
Double_t
refValue );
61
62
private
:
63
64
Double_t
fRootMin
;
// minimum root value
65
Double_t
fRootMax
;
// maximum root value
66
Int_t
fMaxIter
;
// maximum number of iterations
67
Double_t
fAbsTol
;
// absolute tolerance deviation
68
69
// function pointer
70
Double_t
(*
fGetRootVal
)(
Double_t
);
71
72
mutable
MsgLogger
*
fLogger
;
//! message logger
73
MsgLogger
&
Log
()
const
{
return
*
fLogger
; }
74
75
ClassDef
(
RootFinder
,0)
// Root finding using Brents algorithm
76
};
77
78
}
// namespace TMVA
79
80
#endif
Int_t
int Int_t
Definition:
RtypesCore.h:41
TMVA::RootFinder::fAbsTol
Double_t fAbsTol
Definition:
RootFinder.h:67
TMVA::RootFinder::fRootMax
Double_t fRootMax
Definition:
RootFinder.h:65
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:254
TMVA::RootFinder::fLogger
MsgLogger * fLogger
Definition:
RootFinder.h:72
TMVA::RootFinder::Root
Double_t Root(Double_t refValue)
Root finding using Brents algorithm; taken from CERNLIB function RZERO.
Definition:
RootFinder.cxx:65
TMVA::RootFinder::fRootMin
Double_t fRootMin
Definition:
RootFinder.h:64
TMVA::RootFinder::RootFinder
RootFinder(Double_t(*rootVal)(Double_t), Double_t rootMin, Double_t rootMax, Int_t maxIterations=100, Double_t absTolerance=0.0)
TMVA::RootFinder::fMaxIter
Int_t fMaxIter
Definition:
RootFinder.h:66
Double_t
double Double_t
Definition:
RtypesCore.h:55
TMVA::RootFinder::~RootFinder
virtual ~RootFinder(void)
destructor
Definition:
RootFinder.cxx:57
TMVA::RootFinder::fGetRootVal
Double_t(* fGetRootVal)(Double_t)
Definition:
RootFinder.h:70
TMVA::MsgLogger
Definition:
MsgLogger.h:63
TObject
Mother of all ROOT objects.
Definition:
TObject.h:58
TMVA::RootFinder
Definition:
RootFinder.h:49
TObject.h
TMVA::RootFinder::Log
MsgLogger & Log() const
message logger
Definition:
RootFinder.h:73