26 #include "RConfigure.h" 35 #ifndef MATH_NO_PLUGIN_MANAGER 40 #else // case no plugin manager is available 41 #ifdef R__HAS_MATHMORE 55 std::string typeName(name);
56 std::transform(typeName.begin(), typeName.end(), typeName.begin(), (int(*)(int)) toupper );
62 if (!typeName.empty())
MATH_WARN_MSG(
"IntegratorOneDim::GetType",
"Invalid type name specified - use default integrator" );
73 MATH_WARN_MSG(
"IntegratorOneDim::GetType",
"Invalid type specified " );
74 return std::string(
"undefined");
80 std::string typeName(name);
81 std::transform(typeName.begin(), typeName.end(), typeName.begin(), (int(*)(int)) toupper );
86 if (!typeName.empty())
MATH_WARN_MSG(
"IntegratorMultiDim::GetType",
"Invalid type name specified - use default integrator " );
96 MATH_WARN_MSG(
"IntegratorMultiDim::GetType",
"Invalid type specified " );
97 return std::string(
"Undefined");
103 unsigned int ndim = f.
NDim();
104 assert (icoord < ndim);
107 if (x != 0) adapter.
SetX(x, x+ ndim);
127 #ifndef R__HAS_MATHMORE 143 #ifdef MATH_NO_PLUGIN_MANAGER // no PM available 144 #ifdef R__HAS_MATHMORE 147 MATH_ERROR_MSG(
"IntegratorOneDim::CreateIntegrator",
"Integrator type is not available in MathCore");
150 #else // case of using Plugin Manager 157 if ((h =
gROOT->GetPluginManager()->FindHandler(
"ROOT::Math::VirtualIntegrator",
"GSLIntegrator"))) {
159 MATH_WARN_MSG(
"IntegratorOneDim::CreateIntegrator",
"Error loading one dimensional GSL integrator - use Gauss integrator");
164 std::string typeName =
GetName(type);
170 std::cout <<
"Loaded Integrator " <<
typeid(*ig).name() << std::endl;
181 #ifndef R__HAS_MATHMORE 201 #ifdef MATH_NO_PLUGIN_MANAGER // no PM available 202 #ifdef R__HAS_MATHMORE 205 MATH_ERROR_MSG(
"IntegratorMultiDim::CreateIntegrator",
"Integrator type is not available in MathCore");
208 #else // use ROOT Plugin-Manager to instantiate GSLMCIntegrator 212 const char * pluginName =
"GSLMCIntegrator";
215 if ((h =
gROOT->GetPluginManager()->FindHandler(
"ROOT::Math::VirtualIntegrator", pluginName))) {
217 MATH_WARN_MSG(
"IntegratorMultiDim::CreateIntegrator",
"Error loading GSL MC multidim integrator - use adaptive method");
221 std::string typeName =
GetName(type);
227 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.
static std::string DefaultIntegrator()
OneDimMultiFunctionAdapter class to wrap a multidimensional function in one dimensional one...
static unsigned int DefaultWKSize()
static double DefaultRelTolerance()
Class for performing numerical integration of a function in one dimension.
static IntegrationOneDim::Type DefaultIntegratorType()
#define MATH_ERROR_MSG(loc, str)
Documentation for the abstract class IBaseFunctionMultiDim.
Interface (abstract) class for multi numerical integration It must be implemented by the concrete Int...
Long_t ExecPlugin(int nargs, const T &... params)
static std::string DefaultIntegrator()
static IntegrationOneDim::Type GetType(const char *name)
static function to get the enumeration from a string
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.
#define R__LOCKGUARD2(mutex)
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
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.
virtual unsigned int NDim() const =0
Retrieve the dimension of the function.
static unsigned int DefaultNCalls()