|
ROOT
Reference Guide |
|
Go to the documentation of this file.
26 #include "RConfigure.h"
35 #ifndef MATH_NO_PLUGIN_MANAGER
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
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;
void SetX(Iterator begin, Iterator end)
Set X values in case vector is own, iterator size must match previous set dimension.
static unsigned int DefaultWKSize()
VirtualIntegratorOneDim * CreateIntegrator(IntegrationOneDim::Type type, double absTol, double relTol, unsigned int size, int rule)
VirtualIntegratorMultiDim * CreateIntegrator(IntegrationMultiDim::Type type, double absTol, double relTol, unsigned int ncall)
static std::string DefaultIntegrator()
void SetFunction(Function &f)
method to set the a generic integration function
Interface (abstract) class for multi numerical integration It must be implemented by the concrete Int...
static IntegrationOneDim::Type DefaultIntegratorType()
static unsigned int DefaultWKSize()
#define MATH_ERROR_MSG(loc, str)
Type
enumeration specifying the integration types.
static std::string GetName(IntegrationOneDim::Type)
static function to get a string from the enumeration
Class for performing numerical integration of a function in one dimension.
static std::string GetName(IntegrationMultiDim::Type)
static function to get a string from the enumeration
#define MATH_WARN_MSG(loc, str)
R__EXTERN TVirtualMutex * gROOTMutex
static unsigned int DefaultNPoints()
Type
enumeration specifying the integration types.
#define R__LOCKGUARD(mutex)
Class for adaptive quadrature integration in multi-dimensions using rectangular regions.
static IntegrationMultiDim::Type GetType(const char *name)
static function to get the enumeration from a string
User class for performing function integration.
static double DefaultRelTolerance()
OneDimMultiFunctionAdapter class to wrap a multidimensional function in one dimensional one.
static std::string DefaultIntegrator()
static double DefaultRelTolerance()
static unsigned int DefaultNCalls()
static double DefaultAbsTolerance()
static double DefaultAbsTolerance()
Interface (abstract) class for 1D numerical integration It must be implemented by the concrate Integr...
Documentation for the abstract class IBaseFunctionMultiDim.
static IntegrationOneDim::Type GetType(const char *name)
static function to get the enumeration from a string
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
User class for performing function integration.
Namespace for new Math classes and functions.