24 #include "RConfigure.h"
36 #ifndef MATH_NO_PLUGIN_MANAGER
41 #else // case no plugin manager is available
42 #ifdef R__HAS_MATHMORE
56 std::string typeName(name);
57 std::transform(typeName.begin(), typeName.end(), typeName.begin(), (int(*)(int)) toupper );
63 if (!typeName.empty())
MATH_WARN_MSG(
"IntegratorOneDim::GetType",
"Invalid type name specified - use default integrator" );
74 MATH_WARN_MSG(
"IntegratorOneDim::GetType",
"Invalid type specified " );
75 return std::string(
"undefined");
81 std::string typeName(name);
82 std::transform(typeName.begin(), typeName.end(), typeName.begin(), (int(*)(int)) toupper );
87 if (!typeName.empty())
MATH_WARN_MSG(
"IntegratorMultiDim::GetType",
"Invalid type name specified - use default integrator " );
97 MATH_WARN_MSG(
"IntegratorMultiDim::GetType",
"Invalid type specified " );
98 return std::string(
"Undefined");
104 unsigned int ndim = f.
NDim();
108 if (x != 0) adapter.
SetX(x, x+ ndim);
128 #ifndef R__HAS_MATHMORE
144 #ifdef MATH_NO_PLUGIN_MANAGER // no PM available
145 #ifdef R__HAS_MATHMORE
148 MATH_ERROR_MSG(
"IntegratorOneDim::CreateIntegrator",
"Integrator type is not available in MathCore");
151 #else // case of using Plugin Manager
158 if ((h =
gROOT->GetPluginManager()->FindHandler(
"ROOT::Math::VirtualIntegrator",
"GSLIntegrator"))) {
160 MATH_WARN_MSG(
"IntegratorOneDim::CreateIntegrator",
"Error loading one dimensional GSL integrator - use Gauss integrator");
165 std::string typeName =
GetName(type);
171 std::cout <<
"Loaded Integrator " <<
typeid(*ig).name() << std::endl;
182 #ifndef R__HAS_MATHMORE
202 #ifdef MATH_NO_PLUGIN_MANAGER // no PM available
203 #ifdef R__HAS_MATHMORE
206 MATH_ERROR_MSG(
"IntegratorMultiDim::CreateIntegrator",
"Integrator type is not available in MathCore");
209 #else // use ROOT Plugin-Manager to instantiate GSLMCIntegrator
213 const char * pluginName =
"GSLMCIntegrator";
216 if ((h =
gROOT->GetPluginManager()->FindHandler(
"ROOT::Math::VirtualIntegrator", pluginName))) {
218 MATH_WARN_MSG(
"IntegratorMultiDim::CreateIntegrator",
"Error loading GSL MC multidim integrator - use adaptive method");
222 std::string typeName =
GetName(type);
228 std::cout <<
"Loaded Integrator " <<
typeid(*ig).name() << std::endl;
static double DefaultAbsTolerance()
static IntegrationMultiDim::Type GetType(const char *name)
static function to get the enumeration from a string
Interface (abstract) class for 1D numerical integration It must be implemented by the concrate Integr...
Namespace for new ROOT classes and functions.
Type
enumeration specifying the integration types.
Int_t LoadPlugin()
Load the plugin library for this handler.
static unsigned int DefaultNPoints()
R__EXTERN TVirtualMutex * gROOTMutex
#define MATH_WARN_MSG(loc, str)
User class for performing function integration.
Long_t ExecPlugin(int nargs, const T &...params)
static std::string DefaultIntegrator()
OneDimMultiFunctionAdapter class to wrap a multidimensional function in one dimensional one...
static unsigned int DefaultWKSize()
UChar_t mod R__LOCKGUARD2(gSrvAuthenticateMutex)
static double DefaultRelTolerance()
Class for performing numerical integration of a function in one dimension.
static IntegrationOneDim::Type DefaultIntegratorType()
#define MATH_ERROR_MSG(loc, str)
Interface (abstract) class for multi numerical integration It must be implemented by the concrete Int...
static std::string DefaultIntegrator()
static IntegrationOneDim::Type GetType(const char *name)
static function to get the enumeration from a string
virtual unsigned int NDim() const =0
Retrieve the dimension of the function.
static std::string GetName(IntegrationMultiDim::Type)
static function to get a string from the enumeration
User class for performing function integration.
Type
enumeration specifying the integration types.
static double DefaultAbsTolerance()
void SetX(Iterator begin, Iterator end)
Set X values in case vector is own, iterator size must match previous set dimension.
static std::string GetName(IntegrationOneDim::Type)
static function to get a string from the enumeration
Namespace for new Math classes and functions.
VirtualIntegratorMultiDim * CreateIntegrator(IntegrationMultiDim::Type type, double absTol, double relTol, unsigned int ncall)
void SetFunction(Function &f)
method to set the a generic integration function
Documentation for the abstract class IBaseFunctionMultiDim.
static unsigned int DefaultWKSize()
static double DefaultRelTolerance()
VirtualIntegratorOneDim * CreateIntegrator(IntegrationOneDim::Type type, double absTol, double relTol, unsigned int size, int rule)
class for adaptive quadrature integration in multi-dimensions using rectangular regions.
static unsigned int DefaultNCalls()