|
ROOT
Reference Guide |
|
Go to the documentation of this file.
14 #ifndef ROOT_Math_Integrator
15 #define ROOT_Math_Integrator
160 template<
class Function>
193 template<
class Function>
228 template<
class Function>
304 template<
class Function>
326 template<
class Function>
393 double Integral(
const std::vector<double> & pts) {
489 template<
class Function>
496 template<
class Function>
499 SetFunction(wf,
false);
500 return Integral(
a,
b);
526 template<
class Function>
529 SetFunction(wf,
false);
530 return Integral(pts);
533 template<
class Function>
536 SetFunction(wf,
false);
537 return IntegralCauchy(
a,
b,
c);
virtual void SetFunction(const IGenFunction &)=0
set integration function
double Error() const
return the estimate of the absolute Error of the last Integral calculation
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,...
Template class to wrap any C++ callable object which takes one argument i.e.
VirtualIntegratorOneDim * CreateIntegrator(IntegrationOneDim::Type type, double absTol, double relTol, unsigned int size, int rule)
VirtualIntegratorOneDim * fIntegrator
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,...
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 IntegralLow(const IGenFunction &f, double b)
evaluate the Integral of a function f over the over the semi-infinite interval (-inf,...
ROOT::Math::IntegratorOneDimOptions Options() const
retrieve the options
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 IntegralLow(double b)=0
evaluate integral over the (-inf, b)
double Integral(const IGenFunction &f)
evaluate the Integral of a function f over the infinite interval (-inf,+inf)
virtual void SetAbsTolerance(double)=0
set the desired absolute Error
void SetFunction(const IGenFunction &f, bool copy=false)
set one dimensional function for 1D integration
double operator()(double x)
define operator() for IntegralLow
void SetFunction(Function &f)
method to set the a generic integration function
virtual void SetRelTolerance(double)=0
set the desired relative Error
IntegratorOneDim & operator=(const IntegratorOneDim &)
virtual double IntegralCauchy(double a, double b, double c)=0
evaluate Cauchy integral
double Result() const
return the Result of the last Integral calculation
double Integral()
evaluate the Integral over the infinite interval (-inf,+inf) using the function previously set with I...
virtual double Result() const =0
return the Result of the last Integral calculation
Double_t(* Function)(Double_t)
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.
Type
enumeration specifying the integration types.
static std::string GetName(IntegrationOneDim::Type)
static function to get a string from the enumeration
VirtualIntegratorOneDim * GetIntegrator()
return a pointer to integrator object
IntegrationOneDim::Type Type
std::string Name() const
return name of integrator
int NEval() const
return number of function evaluations in calculating the integral (if integrator do not implement thi...
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.
virtual double Integral(double a, double b)=0
evaluate integral
Numerical one dimensional integration options.
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...
double IntegralUp(double a)
evaluate the Integral of a function f over the semi-infinite interval (a,+inf) using the function pre...
int Status() const
return the Error Status of the last Integral calculation
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
double Integral(const std::vector< double > &pts)
evaluate the Integral over the defined interval (a,b) using the function previously set with Integrat...
IntegratorOneDim(const IntegratorOneDim &)
virtual int Status() const =0
return the Error Status of the last Integral calculation
void SetOptions(const ROOT::Math::IntegratorOneDimOptions &opt)
set the options
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.
virtual int NEval() const
return number of function evaluations in calculating the integral (if integrator do not implement thi...
void SetRelTolerance(double relTolerance)
set the desired relative Error
void SetAbsTolerance(double absTolerance)
set the desired absolute Error
double IntegralLow(double b)
evaluate the Integral of a function f over the over the semi-infinite interval (-inf,...
virtual ROOT::Math::IntegratorOneDimOptions Options() const =0
get the option used for the integration must be implemented by derived class
double Integral(const IGenFunction &f, double a, double b)
evaluate the Integral of a function f over the defined interval (a,b)
User Class for performing numerical integration of a function in one dimension.
Interface (abstract) class for 1D numerical integration It must be implemented by the concrate Integr...
Documentation for the abstract class IBaseFunctionMultiDim.
double IntegralUp(const IGenFunction &f, double a)
evaluate the Integral of a function f over the semi-infinite interval (a,+inf)
virtual double Error() const =0
return the estimate of the absolute Error of the last Integral calculation
std::string Integrator() const
name of 1D integrator
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,...
static IntegrationOneDim::Type GetType(const char *name)
static function to get the enumeration from a string
IntegratorOneDim Integrator
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Namespace for new Math classes and functions.
virtual ~IntegratorOneDim()
destructor (will delete contained pointers)