Object-oriented Scientific Computing Library: Version 0.910
Data Structures | Public Types | Protected Member Functions
gsl_inte_singular< func_t > Class Template Reference

Base class for integrating a function with a singularity (GSL) More...

#include <gsl_inte_singular.h>

Inheritance diagram for gsl_inte_singular< func_t >:
gsl_inte_kronrod< func_t > gsl_inte inte< func_t > gsl_inte_qags< func_t > gsl_inte_transform< func_t > gsl_inte_cheb< func_t > gsl_inte_qagi< func_t > gsl_inte_qagil< func_t > gsl_inte_qagiu< func_t > gsl_inte_qawc< func_t > gsl_inte_qawo_sin< func_t > gsl_inte_qaws< func_t > gsl_inte_qawf_sin< func_t > gsl_inte_qawo_cos< func_t > gsl_inte_qawf_cos< func_t >

Detailed Description

template<class func_t>
class gsl_inte_singular< func_t >

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 explained in the Integration section of the User's guide.

Idea for Future:
Some of the functions inside this class could be moved out of header files?

Definition at line 50 of file gsl_inte_singular.h.

Data Structures

struct  extrapolation_table
 A structure for extrapolation for gsl_inte_qags. More...

Public Types

typedef struct
gsl_inte_singular::extrapolation_table 
extrap_table
 A structure for extrapolation for gsl_inte_qags.

Protected Member Functions

void initialise_table (struct extrapolation_table *table)
 Initialize the table.
void append_table (struct extrapolation_table *table, double y)
 Append a result to the table.
int test_positivity (double result, double resabs)
 Test if the integrand satisfies $ f = |f| $.
void qelg (struct extrapolation_table *table, double *result, double *abserr)
 Determines the limit of a given sequence of approximations.
int large_interval (gsl_inte_workspace *workspace)
 Determine if an interval is large.
void reset_nrmax (gsl_inte_workspace *workspace)
 Reset workspace to work on the interval with the largest error.
int increase_nrmax (gsl_inte_workspace *workspace)
 Increase workspace.
int qags (func_t &func, const double a, const double b, const double l_epsabs, const double l_epsrel, double *result, double *abserr)
 Integration function.

Member Typedef Documentation

template<class func_t>
typedef struct gsl_inte_singular::extrapolation_table gsl_inte_singular< func_t >::extrap_table
Idea for Future:
Move this to a new class, with qelg() as a method

Member Function Documentation

template<class func_t>
void gsl_inte_singular< func_t >::qelg ( struct extrapolation_table table,
double *  result,
double *  abserr 
) [inline, protected]

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
	

Definition at line 136 of file gsl_inte_singular.h.

template<class func_t>
int gsl_inte_singular< func_t >::qags ( func_t &  func,
const double  a,
const double  b,
const double  l_epsabs,
const double  l_epsrel,
double *  result,
double *  abserr 
) [inline, protected]
Idea for Future:
Remove goto statements. Before this is done, it might be best to add some tests which fail in the various ways.

Definition at line 344 of file gsl_inte_singular.h.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).

Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads.