ROOT 6.18/05 Reference Guide |
Definition at line 78 of file GSLMCIntegrator.h.
Public Types | |
typedef double(* | GSLMonteFuncPointer) (double *, size_t, void *) |
typedef MCIntegration::Type | Type |
Public Member Functions | |
GSLMCIntegrator (const char *type, double absTol, double relTol, unsigned int calls) | |
constructor of GSL MCIntegrator. More... | |
GSLMCIntegrator (MCIntegration::Type type=MCIntegration::kVEGAS, double absTol=-1, double relTol=-1, unsigned int calls=0) | |
constructor of GSL MCIntegrator. More... | |
virtual | ~GSLMCIntegrator () |
destructor More... | |
double | ChiSqr () |
returns chi-squared per degree of freedom for the estimate of the integral in the Vegas algorithm More... | |
double | Error () const |
return the estimate of the absolute Error of the last Integral calculation More... | |
ROOT::Math::IOptions * | ExtraOptions () const |
get the specific options (for Vegas or Miser) in term of string- name More... | |
MCIntegration::Type | GetType () const |
return the type (need to be called GetType to avois a conflict with typedef) More... | |
const char * | GetTypeName () const |
return the name More... | |
double | Integral (const double *a, const double *b) |
evaluate the integral using the previously defined function More... | |
double | Integral (const GSLMonteFuncPointer &f, unsigned int dim, double *a, double *b, void *p=0) |
evaluate the Integral of a function f over the defined hypercube (a,b) More... | |
int | NEval () const |
return number of function evaluations in calculating the integral (This is an fixed by the user) More... | |
ROOT::Math::IntegratorMultiDimOptions | Options () const |
get the option used for the integration More... | |
double | Result () const |
return the type of the integration used More... | |
void | SetAbsTolerance (double absTolerance) |
set the desired absolute Error More... | |
void | SetFunction (const IMultiGenFunction &f) |
method to set the a generic integration function More... | |
void | SetFunction (GSLMonteFuncPointer f, unsigned int dim, void *p=0) |
void | SetGenerator (GSLRandomEngine &r) |
set random number generator More... | |
void | SetMode (MCIntegration::Mode mode) |
set integration mode for VEGAS method The possible MODE are : MCIntegration::kIMPORTANCE (default) : VEGAS will use importance sampling MCIntegration::kSTRATIFIED : VEGAS will use stratified sampling if certain condition are satisfied MCIntegration::kIMPORTANCE_ONLY : VEGAS will always use importance smapling More... | |
void | SetOptions (const ROOT::Math::IntegratorMultiDimOptions &opt) |
set the integration options More... | |
void | SetParameters (const MiserParameters &p) |
set default parameters for MISER method More... | |
void | SetParameters (const VegasParameters &p) |
set default parameters for VEGAS method More... | |
void | SetRelTolerance (double relTolerance) |
set the desired relative Error More... | |
void | SetType (MCIntegration::Type type) |
set integration method More... | |
void | SetTypeName (const char *typeName) |
set integration method using a name instead of an enumeration More... | |
double | Sigma () |
set parameters for PLAIN method More... | |
int | Status () const |
return the Error Status of the last Integral calculation More... | |
Public Member Functions inherited from ROOT::Math::VirtualIntegratorMultiDim | |
virtual | ~VirtualIntegratorMultiDim () |
destructor: no operation More... | |
virtual double | Integral (const double *, const double *)=0 |
evaluate multi-dim integral More... | |
virtual ROOT::Math::IntegratorMultiDimOptions | Options () const =0 |
get the option used for the integration impelement by derived class otherwise return default ones More... | |
virtual void | SetFunction (const IMultiGenFunction &)=0 |
setting a multi-dim function More... | |
virtual void | SetOptions (const ROOT::Math::IntegratorMultiDimOptions &opt) |
set the options (if needed must be re-implemented by derived classes) More... | |
virtual ROOT::Math::IntegrationMultiDim::Type | Type () const |
Public Member Functions inherited from ROOT::Math::VirtualIntegrator | |
virtual | ~VirtualIntegrator () |
virtual double | Error () const =0 |
return the estimate of the absolute Error of the last Integral calculation More... | |
virtual int | NEval () const |
return number of function evaluations in calculating the integral (if integrator do not implement this function returns -1) More... | |
virtual double | Result () const =0 |
return the Result of the last Integral calculation More... | |
virtual void | SetAbsTolerance (double)=0 |
set the desired absolute Error More... | |
virtual void | SetRelTolerance (double)=0 |
set the desired relative Error More... | |
virtual int | Status () const =0 |
return the Error Status of the last Integral calculation More... | |
Protected Member Functions | |
bool | CheckFunction () |
void | DoInitialize () |
Private Member Functions | |
GSLMCIntegrator (const GSLMCIntegrator &) | |
GSLMCIntegrator & | operator= (const GSLMCIntegrator &) |
Private Attributes | |
double | fAbsTol |
unsigned int | fCalls |
unsigned int | fDim |
double | fError |
bool | fExtGen |
GSLMonteFunctionWrapper * | fFunction |
double | fRelTol |
double | fResult |
GSLRngWrapper * | fRng |
int | fStatus |
MCIntegration::Type | fType |
GSLMCIntegrationWorkspace * | fWorkspace |
#include <Math/GSLMCIntegrator.h>
typedef double(* ROOT::Math::GSLMCIntegrator::GSLMonteFuncPointer) (double *, size_t, void *) |
Definition at line 145 of file GSLMCIntegrator.h.
Definition at line 82 of file GSLMCIntegrator.h.
|
explicit |
constructor of GSL MCIntegrator.
VEGAS MC is set as default integration type
type | type of integration. The possible types are defined in the MCIntegration::Type enumeration Default is VEGAS |
absTol | desired absolute Error (this parameter is actually not used and it can be ignored. The tolerance is fixed by the number of given calls) |
relTol | desired relative Error (this parameter is actually not used and it can be ignored. The tolerance is fixed by the number of given calls) |
calls | maximum number of function calls |
NOTE: When the default values are used , the options are taken from teh static method of ROOT::Math::IntegratorMultiDimOptions
Definition at line 73 of file GSLMCIntegrator.cxx.
ROOT::Math::GSLMCIntegrator::GSLMCIntegrator | ( | const char * | type, |
double | absTol, | ||
double | relTol, | ||
unsigned int | calls | ||
) |
constructor of GSL MCIntegrator.
VEGAS MC is set as default integration type
type | type of integration using a char * (required by plug-in manager) |
absTol | desired absolute Error |
relTol | desired relative Error |
calls | maximum number of function calls |
Definition at line 102 of file GSLMCIntegrator.cxx.
|
virtual |
destructor
Definition at line 133 of file GSLMCIntegrator.cxx.
|
private |
Definition at line 147 of file GSLMCIntegrator.cxx.
|
protected |
Definition at line 452 of file GSLMCIntegrator.cxx.
double ROOT::Math::GSLMCIntegrator::ChiSqr | ( | ) |
returns chi-squared per degree of freedom for the estimate of the integral in the Vegas algorithm
Definition at line 434 of file GSLMCIntegrator.cxx.
|
protected |
Definition at line 396 of file GSLMCIntegrator.cxx.
|
virtual |
return the estimate of the absolute Error of the last Integral calculation
Implements ROOT::Math::VirtualIntegrator.
Definition at line 247 of file GSLMCIntegrator.cxx.
ROOT::Math::IOptions * ROOT::Math::GSLMCIntegrator::ExtraOptions | ( | ) | const |
get the specific options (for Vegas or Miser) in term of string- name
Definition at line 479 of file GSLMCIntegrator.cxx.
|
inline |
return the type (need to be called GetType to avois a conflict with typedef)
Definition at line 275 of file GSLMCIntegrator.h.
const char * ROOT::Math::GSLMCIntegrator::GetTypeName | ( | ) | const |
return the name
Definition at line 461 of file GSLMCIntegrator.cxx.
|
virtual |
evaluate the integral using the previously defined function
Implements ROOT::Math::VirtualIntegratorMultiDim.
Definition at line 176 of file GSLMCIntegrator.cxx.
double ROOT::Math::GSLMCIntegrator::Integral | ( | const GSLMonteFuncPointer & | f, |
unsigned int | dim, | ||
double * | a, | ||
double * | b, | ||
void * | p = 0 |
||
) |
evaluate the Integral of a function f over the defined hypercube (a,b)
f | integration function. The function type must implement the mathlib::IGenFunction interface |
a | lower value of the integration interval |
b | upper value of the integration interval |
Definition at line 222 of file GSLMCIntegrator.cxx.
|
inlinevirtual |
return number of function evaluations in calculating the integral (This is an fixed by the user)
Reimplemented from ROOT::Math::VirtualIntegrator.
Definition at line 197 of file GSLMCIntegrator.h.
|
private |
Definition at line 151 of file GSLMCIntegrator.cxx.
|
virtual |
get the option used for the integration
Implements ROOT::Math::VirtualIntegratorMultiDim.
Definition at line 468 of file GSLMCIntegrator.cxx.
|
virtual |
return the type of the integration used
return the Result of the last Integral calculation
Implements ROOT::Math::VirtualIntegrator.
Definition at line 242 of file GSLMCIntegrator.cxx.
|
virtual |
set the desired absolute Error
Implements ROOT::Math::VirtualIntegrator.
Definition at line 265 of file GSLMCIntegrator.cxx.
|
virtual |
method to set the a generic integration function
f | integration function. The function type must implement the assigment operator, double operator() ( double x ) |
Implements ROOT::Math::VirtualIntegratorMultiDim.
Definition at line 157 of file GSLMCIntegrator.cxx.
void ROOT::Math::GSLMCIntegrator::SetFunction | ( | GSLMonteFuncPointer | f, |
unsigned int | dim, | ||
void * | p = 0 |
||
) |
Definition at line 165 of file GSLMCIntegrator.cxx.
void ROOT::Math::GSLMCIntegrator::SetGenerator | ( | GSLRandomEngine & | r | ) |
set random number generator
Definition at line 267 of file GSLMCIntegrator.cxx.
void ROOT::Math::GSLMCIntegrator::SetMode | ( | MCIntegration::Mode | mode | ) |
set integration mode for VEGAS method The possible MODE are : MCIntegration::kIMPORTANCE (default) : VEGAS will use importance sampling MCIntegration::kSTRATIFIED : VEGAS will use stratified sampling if certain condition are satisfied MCIntegration::kIMPORTANCE_ONLY : VEGAS will always use importance smapling
Definition at line 325 of file GSLMCIntegrator.cxx.
|
virtual |
set the integration options
Reimplemented from ROOT::Math::VirtualIntegratorMultiDim.
Definition at line 340 of file GSLMCIntegrator.cxx.
void ROOT::Math::GSLMCIntegrator::SetParameters | ( | const MiserParameters & | p | ) |
set default parameters for MISER method
Definition at line 382 of file GSLMCIntegrator.cxx.
void ROOT::Math::GSLMCIntegrator::SetParameters | ( | const VegasParameters & | p | ) |
set default parameters for VEGAS method
Definition at line 369 of file GSLMCIntegrator.cxx.
|
virtual |
set the desired relative Error
Implements ROOT::Math::VirtualIntegrator.
Definition at line 260 of file GSLMCIntegrator.cxx.
void ROOT::Math::GSLMCIntegrator::SetType | ( | MCIntegration::Type | type | ) |
set integration method
Definition at line 274 of file GSLMCIntegrator.cxx.
void ROOT::Math::GSLMCIntegrator::SetTypeName | ( | const char * | typeName | ) |
set integration method using a name instead of an enumeration
Definition at line 300 of file GSLMCIntegrator.cxx.
double ROOT::Math::GSLMCIntegrator::Sigma | ( | ) |
set parameters for PLAIN method
returns the error sigma from the last iteration of the Vegas algorithm
Definition at line 414 of file GSLMCIntegrator.cxx.
|
virtual |
return the Error Status of the last Integral calculation
Implements ROOT::Math::VirtualIntegrator.
Definition at line 252 of file GSLMCIntegrator.cxx.
|
private |
Definition at line 311 of file GSLMCIntegrator.h.
|
private |
Definition at line 310 of file GSLMCIntegrator.h.
|
private |
Definition at line 309 of file GSLMCIntegrator.h.
|
private |
Definition at line 317 of file GSLMCIntegrator.h.
|
private |
Definition at line 319 of file GSLMCIntegrator.h.
|
private |
Definition at line 323 of file GSLMCIntegrator.h.
|
private |
Definition at line 312 of file GSLMCIntegrator.h.
|
private |
Definition at line 316 of file GSLMCIntegrator.h.
|
private |
Definition at line 307 of file GSLMCIntegrator.h.
|
private |
Definition at line 318 of file GSLMCIntegrator.h.
|
private |
Definition at line 305 of file GSLMCIntegrator.h.
|
private |
Definition at line 322 of file GSLMCIntegrator.h.