Class inte_singular_gsl (o2scl)¶
-
template<class func_t>
class inte_singular_gsl : public o2scl::inte_kronrod_gsl<func_t>¶ Base class for integrating a function with a singularity (GSL)
This class contains the extrapolation table mechanics and the base integration function for singular integrals from GSL.
The casual end-user should use the classes described in the One-dimensional integration based on GSL, CERNLIB, and Boost section of the User’s guide.
- Idea for Future:
Some of the functions inside this class could be moved out of header files?
Subclassed by o2scl::inte_transform_gsl< func_t >, o2scl::inte_transform_gsl< funct >, o2scl::inte_qags_gsl< func_t >, o2scl::inte_transform_gsl< func_t >
Public Types
-
typedef struct o2scl::inte_singular_gsl::extrapolation_table extrap_table¶
A structure for extrapolation for o2scl::inte_qags_gsl.
- Idea for Future:
Move this to a new class, with qelg() as a method
Protected Functions
-
inline void initialise_table(struct extrapolation_table *table)¶
Initialize the table.
-
inline void append_table(struct extrapolation_table *table, double y)¶
Append a result to the table.
-
inline int test_positivity(double result, double resabs)¶
Test if the integrand satisfies \( f = |f| \).
-
inline void qelg(struct extrapolation_table *table, double *result, double *abserr)¶
Determines the limit of a given sequence of approximations.
For certain convergent series \( \sum_k a_k \) whose error term \( E_n = \sum_{k=n}^\infty a_k \) is well behaved, it is possible to find a transformation of the sequence that yields a faster converging series to the same limit. This method of extrapolation applies to some sequences of adaptive-approximation and error-estimation for numerical integration.
This function implements the \(\varepsilon\)-algorithm ([Wynn56], [Piessens83]) for an extrapolation table stored in table.
Quadpack documentation
c c list of major variables c ----------------------- c e0 - the 4 elements on which the computation of a new c e1 element in the epsilon table is based c e2 c e3 e0 c e3 e1 new c e2 c newelm - number of elements to be computed in the new c diagonal c error - error = abs(e1-e0)+abs(e2-e1)+abs(new-e2) c result - the element in the new diagonal with least value c of error c c machine dependent constants c --------------------------- c c epmach is the largest relative spacing. c oflow is the largest positive magnitude. c limexp is the maximum number of elements the epsilon c table can contain. if this number is reached, the upper c diagonal of the epsilon table is deleted. c
-
inline int large_interval(inte_workspace_gsl *workspace)¶
Determine if an interval is large.
-
inline void reset_nrmax(inte_workspace_gsl *workspace)¶
Reset workspace to work on the interval with the largest error.
-
inline int increase_nrmax(inte_workspace_gsl *workspace)¶
Increase workspace.
-
struct extrapolation_table¶
A structure for extrapolation for o2scl::inte_qags_gsl.
- Idea for Future:
Move this to a new class, with qelg() as a method