32 MATH_WARN_MSG(
"ROOT::Math::GausIntegrator",
"Invalid tolerance given, use values of 1.E-9");
75 MATH_INFO_MSG(
"ROOT::Math::GausIntegratorOneDim",
"Invalid tolerance given - use default values");
81 const double kHF = 0.5;
82 const double kCST = 5./1000;
84 double x[12] = { 0.96028985649753623, 0.79666647741362674,
85 0.52553240991632899, 0.18343464249564980,
86 0.98940093499164993, 0.94457502307323258,
87 0.86563120238783174, 0.75540440835500303,
88 0.61787624440264375, 0.45801677765722739,
89 0.28160355077925891, 0.09501250983763744};
91 double w[12] = { 0.10122853629037626, 0.22238103445337447,
92 0.31370664587788729, 0.36268378337836198,
93 0.02715245941175409, 0.06225352393864789,
94 0.09515851168249278, 0.12462897125553387,
95 0.14959598881657673, 0.16915651939500254,
96 0.18260341504492359, 0.18945061045506850};
98 double h, aconst, bb, aa,
c1,
c2, u, s8, s16,
f1,
f2;
104 MATH_ERROR_MSG(
"ROOT::Math::GausIntegratorOneDim",
"A function must be set first!");
110 if (b == a)
return h;
123 f1 = (*function)(xx);
126 f2 = (*function) (xx);
128 s8 += w[i]*(f1 +
f2);
134 f1 = (*function) (xx);
137 f2 = (*function) (xx);
139 s16 += w[i]*(f1 +
f2);
146 if(bb != b)
goto CASE1;
149 if(1. + aconst*
std::abs(c2) != 1)
goto CASE2;
151 MATH_WARN_MSGVAL(
"ROOT::Math::GausIntegrator",
"Failed to reach the desired tolerance ",maxtol);
167 MATH_ERROR_MSG(
"ROOT::Math::GaussIntegrator",
"You must calculate the result at least once!");
189 MATH_WARN_MSG(
"ROOT::Math::GaussIntegrator",
"This method is not implemented in this class !");
196 MATH_WARN_MSG(
"ROOT::Math::GaussIntegrator",
"This method is not implemented in this class !");
222 : fSign(
kPlus), fIntegrand(integrand), fBoundary(0.), fInfiniteInterval(true) {
226 : fSign(sign), fIntegrand(integrand), fBoundary(boundary), fInfiniteInterval(
false) {
235 double mappedX = 1. / x - 1.;
double Error() const
Return the estimate of the absolute Error of the last Integral calculation.
virtual void SetAbsTolerance(double eps)
This method is not implemented.
double IntegralUp(double a)
Returns Integral of function on an upper semi-infinite interval.
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
Namespace for new ROOT classes and functions.
double Integral()
Returns Integral of function on an infinite interval.
void SetWKSize(unsigned int size)
set workspace size
GaussIntegrator(double absTol=-1, double relTol=-1)
Default Constructor.
void SetNPoints(unsigned int n)
set number of points rule values of 1,2,3,4,5,6 corresponds to 15,21,31,41,51,61 and they are used in...
virtual double DoIntegral(double a, double b, const IGenFunction *func)
Integration surrugate method.
#define MATH_WARN_MSG(loc, str)
ClassImp(TIterator) Bool_t TIterator return false
Compare two iterator objects.
double IntegralLow(double b)
Returns Integral of function on a lower semi-infinite interval.
virtual void SetRelTolerance(double eps)
Set the desired relative Error.
double IntegralCauchy(double a, double b, double c)
This method is not implemented.
static double DefaultRelTolerance()
double pow(double, double)
static Vc_ALWAYS_INLINE Vector< T > abs(const Vector< T > &x)
#define MATH_ERROR_MSG(loc, str)
void AbsValue(bool flag)
Static function: set the fgAbsValue flag.
#define MATH_INFO_MSG(loc, str)
virtual ~GaussIntegrator()
Destructor.
Numerical one dimensional integration 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 ...
void SetFunction(const IGenFunction &)
Set integration function (flag control if function must be copied inside).
static double DefaultAbsTolerance()
double RelTolerance() const
absolute tolerance
#define MATH_WARN_MSGVAL(loc, str, x)
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
Namespace for new Math classes and functions.
virtual ROOT::Math::IntegratorOneDimOptions Options() const
get the option used for the integration
double f2(const double *x)
double AbsTolerance() const
non-static methods for retrivieng options
int Status() const
return the status of the last integration - 0 in case of success
double Result() const
Returns the result of the last Integral calculation.
void SetIntegrator(const char *name)
set 1D integrator name
void SetRelTolerance(double tol)
set the relative tolerance
const IGenFunction * fFunction
void SetAbsTolerance(double tol)
non-static methods for setting options