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 !=
nullptr) 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");
167 assert(ig !=
nullptr);
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");
224 assert(ig !=
nullptr);
227 std::cout <<
"Loaded Integrator " <<
typeid(*ig).name() << std::endl;
#define MATH_ERROR_MSG(loc, str)
#define MATH_WARN_MSG(loc, str)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
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 concrete Integr...
Type
enumeration specifying the integration types.
@ kADAPTIVESINGULAR
default adaptive integration type which can be used in the case of the presence of singularities.
@ kNONADAPTIVE
to be used for smooth functions
@ kLEGENDRE
Gauss-Legendre integration.
@ kADAPTIVE
to be used for general functions without singularities
@ kGAUSS
simple Gauss integration method with fixed rule
@ kDEFAULT
default type specified in the static options
Type
enumeration specifying the integration types.
@ kADAPTIVE
adaptive multi-dimensional integration
@ kDEFAULT
default type specified in the static option
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...