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