67 void eps(
const double&
eps);
68 const double&
eps(
void)
const;
70 const bool&
silent(
void)
const;
71 const int&
iter(
void)
const;
72 const int&
calls(
void)
const;
74 const std::string&
message(
void)
const;
77 double romberg(std::vector<double> bounds,
78 const int& order = 5);
79 double romberg(
const double& a,
const double& b,
80 const int& order = 5);
81 double trapzd(
const double& a,
94 double polint(
double* xa,
double* ya,
int n,
double x,
double *dy);
96 const double&
eps,
const double& S,
97 const double& fa,
const double& fb,
99 const int& bottom)
const;
101 const double& result_abs,
102 const double& result_asc)
const;
131 return (
"GIntegral");
Definition of interface for all GammaLib classes.
Interface class for all GammaLib classes.
Single parameter function abstract base class.
GIntegral class interface definition.
const bool & silent(void) const
Get silence flag.
const std::string & message(void) const
Return integration status message.
std::string m_message
Status message (if result is invalid)
int m_calls
Number of function calls used.
const double & eps(void) const
Get relative precision.
double adaptive_simpson_aux(const double &a, const double &b, const double &eps, const double &S, const double &fa, const double &fb, const double &fc, const int &bottom) const
Auxiliary function for adaptive Simpson's method.
const int & iter(void) const
Return number of iterations.
double romberg(std::vector< double > bounds, const int &order=5)
Perform Romberg integration.
double m_relerr
Absolute integration error.
void copy_members(const GIntegral &integral)
Copy class members.
double m_eps
Requested relative integration precision.
const int & fixed_iter(void) const
Return fixed number of iterations.
const int & calls(void) const
Get number of function calls.
bool m_has_abserr
Has absolute integration error.
bool m_has_relerr
Has relative integration error.
GIntegral * clone(void) const
Clone integral.
double trapzd(const double &a, const double &b, const int &n=1, double result=0.0)
Perform Trapezoidal integration.
void clear(void)
Clear integral.
std::string classname(void) const
Return class name.
bool m_silent
Suppress integration warnings in console.
const GFunction * kernel(void) const
Get function kernel.
int m_iter
Number of iterations used.
double gauss_kronrod(const double &a, const double &b) const
Gauss-Kronrod integration.
virtual ~GIntegral(void)
Destructor.
int m_max_iter
Maximum number of iterations.
void init_members(void)
Initialise class members.
double adaptive_simpson(const double &a, const double &b) const
Adaptive Simpson's integration.
GFunction * m_kernel
Pointer to function kernel.
std::string print(const GChatter &chatter=NORMAL) const
Print integral information.
GIntegral(void)
Void constructor.
void free_members(void)
Delete class members.
GIntegral & operator=(const GIntegral &integral)
Assignment operator.
const int & max_iter(void) const
Return maximum number of iterations.
double rescale_error(double err, const double &result_abs, const double &result_asc) const
Rescale errors for Gauss-Kronrod integration.
const bool & is_valid(void) const
Signal if integration result is valid.
double m_abserr
Absolute integration error.
bool m_isvalid
Integration result valid (true=yes)
double polint(double *xa, double *ya, int n, double x, double *dy)
Perform Polynomial interpolation.
int m_fix_iter
Fixed number of iterations.