14 #ifndef ROOT_Math_Integrator 15 #define ROOT_Math_Integrator 17 #ifndef ROOT_Math_AllIntegrationTypes 21 #ifndef ROOT_Math_IntegratorOptions 25 #ifndef ROOT_Math_IFunction 29 #ifndef ROOT_Math_VirtualIntegrator 167 template<
class Function>
200 template<
class Function>
235 template<
class Function>
236 double Integral(Function & f,
double a,
double b);
311 template<
class Function>
312 double Integral(Function & f,
const std::vector<double> & pts );
333 template<
class Function>
400 double Integral(
const std::vector<double> & pts) {
494 #ifndef ROOT_Math_WrappedFunction 498 template<
class Function>
505 template<
class Function>
535 template<
class Function>
542 template<
class Function>
IntegratorOneDim & operator=(const IntegratorOneDim &)
virtual void SetRelTolerance(double)=0
set the desired relative Error
Interface (abstract) class for 1D numerical integration It must be implemented by the concrate Integr...
void SetRelTolerance(double relTolerance)
set the desired relative Error
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
double Integral()
evaluate the Integral over the infinite interval (-inf,+inf) using the function previously set with I...
void SetFunction(const IGenFunction &f, bool copy=false)
set one dimensional function for 1D integration
double operator()(double x)
define operator() for IntegralLow
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
int Status() const
return the Error Status of the last Integral calculation
virtual double Result() const =0
return the Result of the last Integral calculation
virtual void SetFunction(const IGenFunction &)=0
set integration function
IntegratorOneDim(const IGenFunction &f, IntegrationOneDim::Type type=IntegrationOneDim::kDEFAULT, double absTol=-1, double relTol=-1, unsigned int size=0, int rule=0)
Constructor of one dimensional Integrator passing a function interface.
double Integral(const std::vector< double > &pts)
evaluate the Integral over the defined interval (a,b) using the function previously set with Integrat...
virtual ROOT::Math::IntegratorOneDimOptions Options() const =0
get the option used for the integration must be implemented by derived class
virtual double Error() const =0
return the estimate of the absolute Error of the last Integral calculation
void SetAbsTolerance(double absTolerance)
set the desired absolute Error
IntegratorOneDim(Function &f, IntegrationOneDim::Type type=IntegrationOneDim::kDEFAULT, double absTol=-1, double relTol=-1, unsigned int size=0, int rule=0)
Template Constructor of one dimensional Integrator passing a generic function object.
Template class to wrap any C++ callable object which takes one argument i.e.
virtual double IntegralLow(double b)=0
evaluate integral over the (-inf, b)
double IntegralUp(double a)
evaluate the Integral of a function f over the semi-infinite interval (a,+inf) using the function pre...
IntegratorOneDim(const IntegratorOneDim &)
double Integral(const IGenFunction &f, double a, double b)
evaluate the Integral of a function f over the defined interval (a,b)
virtual void SetOptions(const ROOT::Math::IntegratorOneDimOptions &opt)
set the options (should be re-implemented by derived classes -if more options than tolerance exist ...
virtual double IntegralCauchy(double a, double b, double c)=0
evaluate Cauchy integral
double Error() const
return the estimate of the absolute Error of the last Integral calculation
virtual double Integral(double a, double b)=0
evaluate integral
double IntegralLow(double b)
evaluate the Integral of a function f over the over the semi-infinite interval (-inf,b) using the function previously set with Integrator::SetFunction method.
double IntegralLow(const IGenFunction &f, double b)
evaluate the Integral of a function f over the over the semi-infinite interval (-inf,b)
double IntegralUp(const IGenFunction &f, double a)
evaluate the Integral of a function f over the semi-infinite interval (a,+inf)
IntegrationOneDim::Type Type
double IntegralCauchy(double a, double b, double c)
evaluate the Cauchy principal value of the integral of a function f over the defined interval (a...
double IntegralCauchy(Function &f, double a, double b, double c)
evaluate the Cauchy principal value of the integral of a function f over the defined interval (a...
Numerical one dimensional integration options.
static IntegrationOneDim::Type GetType(const char *name)
static function to get the enumeration from a string
User Class for performing numerical integration of a function in one dimension.
VirtualIntegratorOneDim * GetIntegrator()
return a pointer to integrator object
VirtualIntegratorOneDim * fIntegrator
double Integral(const IGenFunction &f, const std::vector< double > &pts)
evaluate the Integral of a function f with known singular points over the defined Integral (a...
double Integral(const IGenFunction &f)
evaluate the Integral of a function f over the infinite interval (-inf,+inf)
virtual int Status() const =0
return the Error Status of the last Integral calculation
void SetOptions(const ROOT::Math::IntegratorOneDimOptions &opt)
set the options
Type
enumeration specifying the integration types.
virtual int NEval() const
return number of function evaluations in calculating the integral (if integrator do not implement thi...
ROOT::Math::IntegratorOneDimOptions Options() const
retrieve the options
std::string Name() const
return name of integrator
virtual ~IntegratorOneDim()
destructor (will delete contained pointers)
static std::string GetName(IntegrationOneDim::Type)
static function to get a string from the enumeration
std::string Integrator() const
name of 1D integrator
Namespace for new Math classes and functions.
virtual double IntegralUp(double a)=0
evaluate integral over the (a, +inf)
double Integral(double a, double b)
evaluate the Integral over the defined interval (a,b) using the function previously set with Integrat...
virtual void SetAbsTolerance(double)=0
set the desired absolute Error
void SetFunction(Function &f)
method to set the a generic integration function
int NEval() const
return number of function evaluations in calculating the integral (if integrator do not implement thi...
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
IntegratorOneDim Integrator
virtual IBaseFunctionOneDim * Clone() const =0
Clone a function.
double IntegralCauchy(const IGenFunction &f, double a, double b, double c)
evaluate the Cauchy principal value of the integral of a function f over the defined interval (a...
Documentation for the abstract class IBaseFunctionMultiDim.
double Result() const
return the Result of the last Integral calculation
VirtualIntegratorOneDim * CreateIntegrator(IntegrationOneDim::Type type, double absTol, double relTol, unsigned int size, int rule)
IntegratorOneDim(IntegrationOneDim::Type type=IntegrationOneDim::kDEFAULT, double absTol=-1, double relTol=-1, unsigned int size=0, unsigned int rule=0)
Constructor of one dimensional Integrator, default type is adaptive.