26#include "RConfigure.h"
35#ifndef MATH_NO_PLUGIN_MANAGER
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
144#ifdef R__HAS_MATHMORE
147 MATH_ERROR_MSG(
"IntegratorOneDim::CreateIntegrator",
"Integrator type is not available in MathCore");
157 if ((
h =
gROOT->GetPluginManager()->FindHandler(
"ROOT::Math::VirtualIntegrator",
"GSLIntegrator"))) {
158 if (
h->LoadPlugin() == -1) {
159 MATH_WARN_MSG(
"IntegratorOneDim::CreateIntegrator",
"Error loading one dimensional GSL integrator - use Gauss integrator");
170 std::cout <<
"Loaded Integrator " <<
typeid(*ig).name() << std::endl;
181#ifndef R__HAS_MATHMORE
201#ifdef MATH_NO_PLUGIN_MANAGER
202#ifdef R__HAS_MATHMORE
205 MATH_ERROR_MSG(
"IntegratorMultiDim::CreateIntegrator",
"Integrator type is not available in MathCore");
212 const char * pluginName =
"GSLMCIntegrator";
215 if ((
h =
gROOT->GetPluginManager()->FindHandler(
"ROOT::Math::VirtualIntegrator", pluginName))) {
216 if (
h->LoadPlugin() == -1) {
217 MATH_WARN_MSG(
"IntegratorMultiDim::CreateIntegrator",
"Error loading GSL MC multidim integrator - use adaptive method");
227 std::cout <<
"Loaded Integrator " <<
typeid(*ig).name() << std::endl;
#define MATH_ERROR_MSG(loc, str)
#define MATH_WARN_MSG(loc, str)
R__EXTERN TVirtualMutex * gROOTMutex
#define R__LOCKGUARD(mutex)
Class for adaptive quadrature integration in multi-dimensions using rectangular regions.
Class for performing numerical integration of a function in one dimension.
User class for performing function integration.
User class for performing function integration.
Documentation for the abstract class IBaseFunctionMultiDim.
static std::string DefaultIntegrator()
static unsigned int DefaultWKSize()
static unsigned int DefaultNCalls()
static double DefaultRelTolerance()
static double DefaultAbsTolerance()
static std::string GetName(IntegrationMultiDim::Type)
static function to get a string from the enumeration
static IntegrationMultiDim::Type GetType(const char *name)
static function to get the enumeration from a string
VirtualIntegratorMultiDim * CreateIntegrator(IntegrationMultiDim::Type type, double absTol, double relTol, unsigned int ncall)
static std::string DefaultIntegrator()
static double DefaultAbsTolerance()
static double DefaultRelTolerance()
static unsigned int DefaultNPoints()
static unsigned int DefaultWKSize()
static IntegrationOneDim::Type DefaultIntegratorType()
static std::string GetName(IntegrationOneDim::Type)
static function to get a string from the enumeration
VirtualIntegratorOneDim * CreateIntegrator(IntegrationOneDim::Type type, double absTol, double relTol, unsigned int size, int rule)
void SetFunction(Function &f)
method to set the a generic integration function
static IntegrationOneDim::Type GetType(const char *name)
static function to get the enumeration from a string
OneDimMultiFunctionAdapter class to wrap a multidimensional function in one dimensional one.
void SetX(Iterator begin, Iterator end)
Set X values in case vector is own, iterator size must match previous set dimension.
Interface (abstract) class for multi numerical integration It must be implemented by the concrete Int...
Interface (abstract) class for 1D numerical integration It must be implemented by the concrate Integr...
Type
enumeration specifying the integration types.
Type
enumeration specifying the integration types.
Namespace for new Math classes and functions.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...