ROOT logo
ROOT » MATH » MATHCORE » ROOT::Math::IntegratorMultiDim

class ROOT::Math::IntegratorMultiDim


   User class for performing multidimensional integration

   By default uses adaptive multi-dimensional integration using the algorithm from Genz Mallik
   implemented in the class ROOT::Math::AdaptiveIntegratorMultiDim otherwise it can uses via the
   plug-in manager the MC integration class (ROOT::Math::GSLMCIntegration) from MathMore.

   @ingroup Integration



Function Members (Methods)

public:
virtual~IntegratorMultiDim()
doubleError() const
ROOT::Math::VirtualIntegratorMultiDim*GetIntegrator()
doubleIntegral(const double* xmin, const double* xmax)
doubleIntegral(const ROOT::Math::IMultiGenFunction& f, const double* xmin, const double* xmax)
ROOT::Math::IntegratorMultiDimIntegratorMultiDim(ROOT::Math::IntegrationMultiDim::Type type = IntegrationMultiDim::kADAPTIVE, double absTol = 1.E-9, double relTol = 1E-6, unsigned int ncall = 100000)
ROOT::Math::IntegratorMultiDimIntegratorMultiDim(const ROOT::Math::IMultiGenFunction& f, ROOT::Math::IntegrationMultiDim::Type type = IntegrationMultiDim::kADAPTIVE, double absTol = 1.E-9, double relTol = 1E-6, unsigned int ncall = 100000)
doubleResult() const
voidSetAbsTolerance(double absTol)
voidSetFunction(const ROOT::Math::IMultiGenFunction& f)
voidSetRelTolerance(double relTol)
intStatus() const
protected:
ROOT::Math::VirtualIntegratorMultiDim*CreateIntegrator(ROOT::Math::IntegrationMultiDim::Type type, double absTol, double relTol, unsigned int ncall)

Data Members

private:
ROOT::Math::VirtualIntegratorMultiDim*fIntegratorpointer to multi-dimensional integrator base class

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

IntegratorMultiDim(ROOT::Math::IntegrationMultiDim::Type type = IntegrationMultiDim::kADAPTIVE, double absTol = 1.E-9, double relTol = 1E-6, unsigned int ncall = 100000)
 Generic constructor of multi dimensional Integrator. By default uses the Adaptive integration method

       @param type   integration type (adaptive, MC methods, etc..)
       @param absTol desired absolute Error
       @param relTol desired relative Error
       @param size maximum number of sub-intervals

IntegratorMultiDim(const ROOT::Math::IMultiGenFunction& f, ROOT::Math::IntegrationMultiDim::Type type = IntegrationMultiDim::kADAPTIVE, double absTol = 1.E-9, double relTol = 1E-6, unsigned int ncall = 100000)
 Generic Constructor of multi dimensional Integrator passing a function. By default uses the adaptive integration method

       @param f      integration function (multi-dim interface)
       @param type   integration type (adaptive, MC methods, etc..)
       @param absTol desired absolute Error
       @param relTol desired relative Error
       @param ncall  number of function calls (apply only to MC integratioon methods)

SetFunction(const ROOT::Math::IMultiGenFunction& f)
IntegratorMultiDim(const Function & f, unsigned int dim, IntegrationMultiDim::Type type = IntegrationMultiDim::kADAPTIVE, double absTol = 1.E-9, double relTol = 1E-6, unsigned int ncall = 100000)
 Template Constructor of multi dimensional Integrator passing a generic function. By default uses the adaptive integration method

       @param f      integration function (generic function implementin operator()(const double *)
       @param dim    function dimension
       @param type   integration type (adaptive, MC methods, etc..)
       @param absTol desired absolute Error
       @param relTol desired relative Error
       @param ncall  number of function calls (apply only to MC integratioon methods)

virtual ~IntegratorMultiDim()
 destructor
IntegratorMultiDim & operator=(const ROOT::Math::IntegratorMultiDim& )
{ return *this; }
double Integral(const double* xmin, const double* xmax)
      evaluate the integral with the previously given function between xmin[] and xmax[]

double Integral(const ROOT::Math::IMultiGenFunction& f, const double* xmin, const double* xmax)
 evaluate the integral passing a new function
double Result() const
 return result of last integration
{ return fIntegrator == 0 ? 0 : fIntegrator->Result(); }
double Error() const
 return integration error
{ return fIntegrator == 0 ? 0 : fIntegrator->Error(); }
int Status() const
  return the Error Status of the last Integral calculation
{ return fIntegrator == 0 ? -1 : fIntegrator->Status(); }
void SetRelTolerance(double relTol)
 return number of function evaluations in calculating the integral
unsigned int NEval() const { return fNEval; }
 set the relative tolerance
void SetAbsTolerance(double absTol)
 set absolute tolerance
VirtualIntegratorMultiDim * GetIntegrator()
 return a pointer to integrator object
{ return fIntegrator; }
VirtualIntegratorMultiDim * CreateIntegrator(ROOT::Math::IntegrationMultiDim::Type type, double absTol, double relTol, unsigned int ncall)