31 #ifndef ROOT_Math_GSLIntegrator
32 #define ROOT_Math_GSLIntegrator
55 class GSLIntegrationWorkspace;
56 class GSLFunctionWrapper;
90 class GSLIntegrator :
public VirtualIntegratorOneDim {
106 GSLIntegrator(
double absTol = 1.E-9,
double relTol = 1E-6,
size_t size = 1000);
120 GSLIntegrator(
const Integration::Type type,
double absTol = 1.E-9,
double relTol = 1E-6,
size_t size = 1000);
134 GSLIntegrator(
const Integration::Type type,
const Integration::GKRule rule,
double absTol = 1.E-9,
double relTol = 1E-6,
size_t size = 1000);
146 GSLIntegrator(
const char * type,
int rule,
double absTol,
double relTol,
size_t size );
148 virtual ~GSLIntegrator();
154 GSLIntegrator(
const GSLIntegrator &);
155 GSLIntegrator & operator=(
const GSLIntegrator &);
170 void SetFunction(
const IGenFunction &f);
175 void SetFunction( GSLFuncPointer f,
void * p = 0);
186 double Integral(
const IGenFunction & f,
double a,
double b);
194 double Integral(
const IGenFunction & f);
203 double IntegralCauchy(
double a,
double b,
double c);
213 double IntegralCauchy(
const IGenFunction & f,
double a,
double b,
double c);
221 double IntegralUp(
const IGenFunction & f,
double a );
228 double IntegralLow(
const IGenFunction & f,
double b );
236 double Integral(
const IGenFunction & f,
const std::vector<double> & pts );
246 double Integral(
double a,
double b);
258 double IntegralUp(
double a );
264 double IntegralLow(
double b );
271 double Integral(
const std::vector<double> & pts);
293 double Integral(GSLFuncPointer f,
void * p,
double a,
double b);
298 double Integral(GSLFuncPointer f,
void * p);
303 double IntegralUp(GSLFuncPointer f,
void * p,
double a);
308 double IntegralLow(GSLFuncPointer f,
void * p,
double b);
313 double Integral(GSLFuncPointer f,
void * p,
const std::vector<double> & pts);
318 double Result()
const;
323 double Error()
const;
333 int NEval()
const {
return fNEval; }
340 void SetRelTolerance(
double relTolerance);
346 void SetAbsTolerance(
double absTolerance);
353 void SetIntegrationRule(Integration::GKRule );
356 virtual void SetOptions(
const ROOT::Math::IntegratorOneDimOptions & opt);
359 virtual ROOT::Math::IntegratorOneDimOptions Options()
const;
362 IntegrationOneDim::Type GetType()
const {
return fType; }
367 const char * GetTypeName()
const;
373 bool CheckFunction();
378 Integration::Type fType;
379 Integration::GKRule fRule;
383 size_t fMaxIntervals;
394 GSLFunctionWrapper * fFunction;
395 GSLIntegrationWorkspace * fWorkspace;