Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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 <cstddef> // for size_t
30#include <memory> // for unique_ptr
31
32#include "Math/IOptions.h"
33
34namespace ROOT {
35namespace Math {
36
37
38/**
39 Structures collecting parameters
40 for VEGAS multidimensional integration
41 For implementation of default parameters see file
42 mathmore/src/GSLMCIntegrationWorkspace.h
43
44 @ingroup MCIntegration
45*/
47 double alpha;
48 size_t iterations;
49 int stage;
50 int mode;
52
53 // constructor of default parameters
55
56 // construct from GenAlgoOptions
57 // parameter not specified are ignored
59
60 void SetDefaultValues();
61
63
64 /// Convert to options
65 std::unique_ptr<ROOT::Math::IOptions> MakeIOptions() const;
66};
67
68
69
70
71/**
72 Structure collecting parameters
73 for MISER multidimensional integration
74
75 @ingroup MCIntegration
76*/
79 size_t min_calls;
81 double alpha;
82 double dither;
83
84 // constructor of default parameters
85 // needs dimension since min_calls = 16 * dim
86 MiserParameters(size_t dim=10) { SetDefaultValues(dim); }
87
88 void SetDefaultValues(size_t dim=10);
89
90 // construct from GenAlgoOptions
91 // parameter not specified are ignored
92 MiserParameters(const ROOT::Math::IOptions & opt, size_t dim = 10);
93
95
96 /// convert to options (return object is managed by the user)
97 std::unique_ptr<ROOT::Math::IOptions> MakeIOptions() const;
98
99};
100
102};
103
104} // namespace Math
105} // namespace ROOT
106
107#endif
Generic interface for defining configuration options of a numerical algorithm.
Definition IOptions.h:28
Namespace for new Math classes and functions.
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
Structure collecting parameters for MISER multidimensional integration.
MiserParameters(size_t dim=10)
MiserParameters & operator=(const ROOT::Math::IOptions &opt)
void SetDefaultValues(size_t dim=10)
default MISER parameters (copied from gsl/monte/vegas.c)
std::unique_ptr< ROOT::Math::IOptions > MakeIOptions() const
convert to options (return object is managed by the user)
Structures collecting parameters for VEGAS multidimensional integration For implementation of default...
VegasParameters & operator=(const ROOT::Math::IOptions &opt)
void SetDefaultValues()
default VEGAS parameters (copied from gsl/monte/vegas.c)
std::unique_ptr< ROOT::Math::IOptions > MakeIOptions() const
Convert to options.