29 #ifndef ROOT_Math_GSLMCIntegrator
30 #define ROOT_Math_GSLMCIntegrator
54 class GSLMCIntegrationWorkspace;
55 class GSLMonteFunctionWrapper;
56 class GSLRandomEngine;
78 class GSLMCIntegrator :
public VirtualIntegratorMultiDim {
82 typedef MCIntegration::Type Type;
104 GSLMCIntegrator(MCIntegration::Type type = MCIntegration::kVEGAS,
double absTol = -1,
double relTol = -1,
unsigned int calls = 0 );
113 GSLMCIntegrator(
const char * type,
double absTol,
double relTol,
unsigned int calls);
119 virtual ~GSLMCIntegrator();
125 GSLMCIntegrator(
const GSLMCIntegrator &);
127 GSLMCIntegrator & operator=(
const GSLMCIntegrator &);
142 void SetFunction(
const IMultiGenFunction &f);
145 typedef double ( * GSLMonteFuncPointer ) (
double *, size_t,
void *);
147 void SetFunction( GSLMonteFuncPointer f,
unsigned int dim,
void * p = 0 );
158 double Integral(
const GSLMonteFuncPointer & f,
unsigned int dim,
double* a,
double* b,
void * p = 0);
164 double Integral(
const double* a,
const double* b);
180 double Result()
const;
185 double Error()
const;
197 int NEval()
const {
return fCalls; }
205 void SetRelTolerance(
double relTolerance);
211 void SetAbsTolerance(
double absTolerance);
216 void SetOptions(
const ROOT::Math::IntegratorMultiDimOptions & opt);
222 void SetGenerator(GSLRandomEngine & r);
227 void SetType(MCIntegration::Type type);
232 void SetTypeName(
const char * typeName);
243 void SetMode(MCIntegration::Mode mode);
248 void SetParameters(
const VegasParameters &p);
254 void SetParameters(
const MiserParameters &p);
275 MCIntegration::Type GetType()
const {
return fType; }
280 const char * GetTypeName()
const;
285 ROOT::Math::IntegratorMultiDimOptions Options()
const;
291 ROOT::Math::IOptions * ExtraOptions()
const;
297 bool CheckFunction();
300 void DoInitialize( );
305 MCIntegration::Type fType;
307 GSLRngWrapper * fRng;
322 GSLMCIntegrationWorkspace * fWorkspace;
323 GSLMonteFunctionWrapper * fFunction;