ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
ROOT::Math::IntegratorMultiDim Class Reference

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.

Definition at line 60 of file IntegratorMultiDim.h.

Public Types

typedef IntegrationMultiDim::Type Type
 

Public Member Functions

 IntegratorMultiDim (IntegrationMultiDim::Type type=IntegrationMultiDim::kDEFAULT, double absTol=-1, double relTol=-1, unsigned int ncall=0)
 Generic constructor of multi dimensional Integrator. More...
 
 IntegratorMultiDim (const IMultiGenFunction &f, IntegrationMultiDim::Type type=IntegrationMultiDim::kDEFAULT, double absTol=-1, double relTol=-1, unsigned int ncall=0)
 Generic Constructor of multi dimensional Integrator passing a function. More...
 
virtual ~IntegratorMultiDim ()
 Template Constructor of multi dimensional Integrator passing a generic function. More...
 
double Integral (const double *xmin, const double *xmax)
 evaluate the integral with the previously given function between xmin[] and xmax[] More...
 
double Integral (const IMultiGenFunction &f, const double *xmin, const double *xmax)
 evaluate the integral passing a new function More...
 
template<class Function >
double Integral (Function &f, unsigned int dim, const double *xmin, const double *xmax)
 evaluate the integral passing a new generic function More...
 
template<class Function >
void SetFunction (Function &f, unsigned int dim)
 set integration function using a generic function implementing the operator()(double *x) The dimension of the function is in this case required More...
 
void SetFunction (const IMultiGenFunction &f)
 
double Result () const
 return result of last integration More...
 
double Error () const
 return integration error More...
 
int Status () const
 return the Error Status of the last Integral calculation More...
 
void SetRelTolerance (double relTol)
 set the relative tolerance More...
 
void SetAbsTolerance (double absTol)
 set absolute tolerance More...
 
void SetOptions (const ROOT::Math::IntegratorMultiDimOptions &opt)
 set the options More...
 
ROOT::Math::IntegratorMultiDimOptions Options () const
 retrieve the options More...
 
VirtualIntegratorMultiDimGetIntegrator ()
 return a pointer to integrator object More...
 
std::string Name () const
 return name of integrator More...
 

Static Public Member Functions

static IntegrationMultiDim::Type GetType (const char *name)
 static function to get the enumeration from a string More...
 
static std::string GetName (IntegrationMultiDim::Type)
 static function to get a string from the enumeration More...
 

Protected Member Functions

VirtualIntegratorMultiDimCreateIntegrator (IntegrationMultiDim::Type type, double absTol, double relTol, unsigned int ncall)
 

Private Member Functions

 IntegratorMultiDim (const IntegratorMultiDim &)
 
IntegratorMultiDimoperator= (const IntegratorMultiDim &)
 

Private Attributes

VirtualIntegratorMultiDimfIntegrator
 
std::auto_ptr< IMultiGenFunctionfFunc
 

#include <Math/IntegratorMultiDim.h>

Member Typedef Documentation

Definition at line 64 of file IntegratorMultiDim.h.

Constructor & Destructor Documentation

ROOT::Math::IntegratorMultiDim::IntegratorMultiDim ( IntegrationMultiDim::Type  type = IntegrationMultiDim::kDEFAULT,
double  absTol = -1,
double  relTol = -1,
unsigned int  ncall = 0 
)
inlineexplicit

Generic constructor of multi dimensional Integrator.

By default uses the Adaptive integration method

Parameters
typeintegration type (adaptive, MC methods, etc..)
absToldesired absolute Error
relToldesired relative Error
sizemaximum number of sub-intervals

In case no parameter values are passed the default ones used in IntegratorMultiDimOptions are used

Definition at line 77 of file IntegratorMultiDim.h.

ROOT::Math::IntegratorMultiDim::IntegratorMultiDim ( const IMultiGenFunction f,
IntegrationMultiDim::Type  type = IntegrationMultiDim::kDEFAULT,
double  absTol = -1,
double  relTol = -1,
unsigned int  ncall = 0 
)
inlineexplicit

Generic Constructor of multi dimensional Integrator passing a function.

By default uses the adaptive integration method

Parameters
fintegration function (multi-dim interface)
typeintegration type (adaptive, MC methods, etc..)
absToldesired absolute Error
relToldesired relative Error
ncallnumber of function calls (apply only to MC integratioon methods)

Definition at line 92 of file IntegratorMultiDim.h.

virtual ROOT::Math::IntegratorMultiDim::~IntegratorMultiDim ( )
inlinevirtual

Template Constructor of multi dimensional Integrator passing a generic function.

By default uses the adaptive integration method

Parameters
fintegration function (generic function implementin operator()(const double *)
dimfunction dimension
typeintegration type (adaptive, MC methods, etc..)
absToldesired absolute Error
relToldesired relative Error
ncallnumber of function calls (apply only to MC integratioon methods)destructor

Definition at line 118 of file IntegratorMultiDim.h.

ROOT::Math::IntegratorMultiDim::IntegratorMultiDim ( const IntegratorMultiDim )
inlineprivate

Definition at line 126 of file IntegratorMultiDim.h.

Member Function Documentation

VirtualIntegratorMultiDim * ROOT::Math::IntegratorMultiDim::CreateIntegrator ( IntegrationMultiDim::Type  type,
double  absTol,
double  relTol,
unsigned int  ncall 
)
protected

Definition at line 179 of file Integrator.cxx.

Referenced by IntegratorMultiDim().

double ROOT::Math::IntegratorMultiDim::Error ( ) const
inline

return integration error

Definition at line 172 of file IntegratorMultiDim.h.

Referenced by TF1::IntegralMultiple().

VirtualIntegratorMultiDim* ROOT::Math::IntegratorMultiDim::GetIntegrator ( )
inline

return a pointer to integrator object

Definition at line 193 of file IntegratorMultiDim.h.

std::string ROOT::Math::IntegratorMultiDim::GetName ( IntegrationMultiDim::Type  type)
static

static function to get a string from the enumeration

Definition at line 91 of file Integrator.cxx.

Referenced by CreateIntegrator(), ROOT::Math::IntegratorMultiDimOptions::DefaultIntegrator(), and ROOT::Math::IntegratorMultiDimOptions::Integrator().

IntegrationMultiDim::Type ROOT::Math::IntegratorMultiDim::GetType ( const char *  name)
static

static function to get the enumeration from a string

Definition at line 79 of file Integrator.cxx.

Referenced by CreateIntegrator(), GetName(), ROOT::Math::IntegratorMultiDimOptions::SetDefaultIntegrator(), and ROOT::Math::IntegratorMultiDimOptions::SetIntegrator().

double ROOT::Math::IntegratorMultiDim::Integral ( const double xmin,
const double xmax 
)
inline

evaluate the integral with the previously given function between xmin[] and xmax[]

Definition at line 135 of file IntegratorMultiDim.h.

Referenced by Integral(), TF1::IntegralMultiple(), and testIntegrationMultiDim().

double ROOT::Math::IntegratorMultiDim::Integral ( const IMultiGenFunction f,
const double xmin,
const double xmax 
)
inline

evaluate the integral passing a new function

Definition at line 140 of file IntegratorMultiDim.h.

template<class Function >
double ROOT::Math::IntegratorMultiDim::Integral ( Function f,
unsigned int  dim,
const double xmin,
const double xmax 
)
inline

evaluate the integral passing a new generic function

Definition at line 147 of file IntegratorMultiDim.h.

std::string ROOT::Math::IntegratorMultiDim::Name ( ) const
inline

return name of integrator

Definition at line 196 of file IntegratorMultiDim.h.

IntegratorMultiDim& ROOT::Math::IntegratorMultiDim::operator= ( const IntegratorMultiDim )
inlineprivate

Definition at line 127 of file IntegratorMultiDim.h.

ROOT::Math::IntegratorMultiDimOptions ROOT::Math::IntegratorMultiDim::Options ( ) const
inline

retrieve the options

Definition at line 190 of file IntegratorMultiDim.h.

Referenced by Name().

double ROOT::Math::IntegratorMultiDim::Result ( ) const
inline

return result of last integration

Definition at line 169 of file IntegratorMultiDim.h.

void ROOT::Math::IntegratorMultiDim::SetAbsTolerance ( double  absTol)
inline

set absolute tolerance

Definition at line 184 of file IntegratorMultiDim.h.

template<class Function >
void ROOT::Math::IntegratorMultiDim::SetFunction ( Function f,
unsigned int  dim 
)
inline

set integration function using a generic function implementing the operator()(double *x) The dimension of the function is in this case required

Definition at line 158 of file IntegratorMultiDim.h.

Referenced by Integral(), IntegratorMultiDim(), and testIntegrationMultiDim().

void ROOT::Math::IntegratorMultiDim::SetFunction ( const IMultiGenFunction f)
inline

Definition at line 164 of file IntegratorMultiDim.h.

void ROOT::Math::IntegratorMultiDim::SetOptions ( const ROOT::Math::IntegratorMultiDimOptions opt)
inline

set the options

Definition at line 187 of file IntegratorMultiDim.h.

void ROOT::Math::IntegratorMultiDim::SetRelTolerance ( double  relTol)
inline

set the relative tolerance

Definition at line 181 of file IntegratorMultiDim.h.

int ROOT::Math::IntegratorMultiDim::Status ( ) const
inline

return the Error Status of the last Integral calculation

Definition at line 175 of file IntegratorMultiDim.h.

Referenced by TF1::IntegralMultiple().

Member Data Documentation

std::auto_ptr<IMultiGenFunction> ROOT::Math::IntegratorMultiDim::fFunc
private

Definition at line 211 of file IntegratorMultiDim.h.

Referenced by SetFunction().

VirtualIntegratorMultiDim* ROOT::Math::IntegratorMultiDim::fIntegrator
private
Collaboration diagram for ROOT::Math::IntegratorMultiDim:
[legend]

The documentation for this class was generated from the following files: