Logo ROOT  
Reference Guide
MCParameters.h
Go to the documentation of this file.
1 // @(#)root/mathmore:$Id$
2 // Author: Magdalena Slawinska 08/2007
3 
4  /**********************************************************************
5  * *
6  * Copyright (c) 2004 ROOT Foundation, CERN/PH-SFT *
7  * *
8  * This library is free software; you can redistribute it and/or *
9  * modify it under the terms of the GNU General Public License *
10  * as published by the Free Software Foundation; either version 2 *
11  * of the License, or (at your option) any later version. *
12  * *
13  * This library is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16  * General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this library (see file COPYING); if not, write *
20  * to the Free Software Foundation, Inc., 59 Temple Place, Suite *
21  * 330, Boston, MA 02111-1307 USA, or contact the author. *
22  * *
23  **********************************************************************/
24 
25 
26 #ifndef ROOT_Math_MCParameters
27 #define ROOT_Math_MCParameters
28 
29 #include <stddef.h> // for size_t
30 
31 namespace ROOT {
32 namespace Math {
33 
34 
35 class IOptions;
36 
37 /**
38  structures collecting parameters
39  for VEGAS multidimensional integration
40  FOr implementation of default parameters see file
41  mathmore/src/GSLMCIntegrationWorkspace.h
42 
43  @ingroup MCIntegration
44 */
45 struct VegasParameters{
46  double alpha;
47  size_t iterations;
48  int stage;
49  int mode;
50  int verbose;
51 
52  // constructor of default parameters
54 
55  // construct from GenAlgoOptions
56  // parameter not specified are ignored
58 
59  void SetDefaultValues();
60 
62 
63  /// convert to options (return object is managed by the user)
65 };
66 
67 
68 
69 
70 /**
71  structures collecting parameters
72  for MISER multidimensional integration
73 
74  @ingroup MCIntegration
75 */
76 struct MiserParameters{
77  double estimate_frac;
78  size_t min_calls;
80  double alpha;
81  double dither;
82 
83  // constructor of default parameters
84  // needs dimension since min_calls = 16 * dim
85  MiserParameters(size_t dim=10) { SetDefaultValues(dim); }
86 
87  void SetDefaultValues(size_t dim=10);
88 
89  // construct from GenAlgoOptions
90  // parameter not specified are ignored
91  MiserParameters(const ROOT::Math::IOptions & opt, size_t dim = 10);
92 
94 
95  /// convert to options (return object is managed by the user)
97 
98 };
99 
100 struct PlainParameters{
101 };
102 
103 } // namespace Math
104 } // namespace ROOT
105 
106 #endif
ROOT::Math::MiserParameters::dither
double dither
Definition: MCParameters.h:119
ROOT::Math::MiserParameters::min_calls_per_bisection
size_t min_calls_per_bisection
Definition: MCParameters.h:117
ROOT::Math::MiserParameters::estimate_frac
double estimate_frac
Definition: MCParameters.h:115
ROOT::Math::VegasParameters::operator=
VegasParameters & operator=(const ROOT::Math::IOptions &opt)
Definition: MCParameters.cxx:92
ROOT::Math::VegasParameters::SetDefaultValues
void SetDefaultValues()
default VEGAS parameters (copied from gsl/monte/vegas.c)
Definition: MCParameters.cxx:78
ROOT::Math::VegasParameters::mode
int mode
Definition: MCParameters.h:87
ROOT::Math::VegasParameters::iterations
size_t iterations
Definition: MCParameters.h:85
ROOT::Math::VegasParameters::verbose
int verbose
Definition: MCParameters.h:88
ROOT::Math::VegasParameters::operator()
ROOT::Math::IOptions * operator()() const
convert to options (return object is managed by the user)
Definition: MCParameters.cxx:111
ROOT::Math::VegasParameters::stage
int stage
Definition: MCParameters.h:86
ROOT::Math::MiserParameters::alpha
double alpha
Definition: MCParameters.h:118
ROOT::Math::VegasParameters::alpha
double alpha
Definition: MCParameters.h:84
ROOT::Math::PlainParameters
Definition: MCParameters.h:138
ROOT::Math::IOptions
Generic interface for defining configuration options of a numerical algorithm.
Definition: IOptions.h:41
ROOT::Math::MiserParameters::min_calls
size_t min_calls
Definition: MCParameters.h:116
ROOT::Math::MiserParameters::MiserParameters
MiserParameters(size_t dim=10)
Definition: MCParameters.h:123
ROOT::Math::MiserParameters::SetDefaultValues
void SetDefaultValues(size_t dim=10)
default MISER parameters (copied from gsl/monte/vegas.c)
Definition: MCParameters.cxx:127
ROOT::Math::VegasParameters::VegasParameters
VegasParameters()
Definition: MCParameters.h:91
ROOT::Math::MiserParameters
structures collecting parameters for MISER multidimensional integration
Definition: MCParameters.h:114
ROOT
VSD Structures.
Definition: StringConv.hxx:21
ROOT::Math::MiserParameters::operator()
ROOT::Math::IOptions * operator()() const
convert to options (return object is managed by the user)
Definition: MCParameters.cxx:161
Math
ROOT::Math::MiserParameters::operator=
MiserParameters & operator=(const ROOT::Math::IOptions &opt)
Definition: MCParameters.cxx:142