gsl_inte_table Class Reference

Base routines for the GSL adaptive integration classes. More...

#include <gsl_inte_qag_b.h>

Inheritance diagram for gsl_inte_table:

gsl_inte gsl_inte_kronrod gsl_inte_qag gsl_inte_singular gsl_inte_qags gsl_inte_transform gsl_inte_cheb gsl_inte_qagi gsl_inte_qagil gsl_inte_qagiu gsl_inte_qawc gsl_inte_qawo_sin gsl_inte_qaws gsl_inte_qawf_sin gsl_inte_qawo_cos gsl_inte_qawf_cos

Detailed Description

This class contains several functions for manipulating the GSL integration workspace. The casual end-user should use the classes explained in the Integration section of the User's guide.

Todo:
Make the workspace size protected
Idea for future:
Move gsl_integration_workspace to a separate class and remove this class, making all children direct descendants of gsl_inte instead. We'll have to figure out what to do with the data member wkspace though. Some work on this front is already in gsl_inte_qag_b.h.
QUADPACK workspace documentation:
      c    parameters (meaning at output)
      c       limit  - integer
      c                maximum number of error estimates the list
      c                can contain
      c          last   - integer
      c                number of error estimates currently in the list
      c          maxerr - integer
      c                maxerr points to the nrmax-th largest error
      c                estimate currently in the list
      c          ermax  - double precision
      c                nrmax-th largest error estimate
      c                ermax = elist(maxerr)
      c          elist  - double precision
      c                vector of dimension last containing
      c                the error estimates
      c          iord   - integer
      c                vector of dimension last, the first k elements
      c                of which contain pointers to the error
      c                estimates, such that
      c                elist(iord(1)),...,  elist(iord(k))
      c                form a decreasing sequence, with
      c                k = last if last.le.(limit/2+2), and
      c                k = limit+1-last otherwise
      c          nrmax  - integer
      c      maxerr = iord(nrmax)
      
      c     alist   - real
      c               vector of dimension at least limit, the first
      c                last  elements of which are the left
      c               end points of the subintervals in the partition
      c               of the given integration range (a,b)
      c            blist   - real
      c               vector of dimension at least limit, the first
      c                last  elements of which are the right
      c               end points of the subintervals in the partition
      c               of the given integration range (a,b)
      c            rlist   - real
      c               vector of dimension at least limit, the first
      c                last  elements of which are the
      c               integral approximations on the subintervals
      c            elist   - real
      c               vector of dimension at least limit, the first
      c                last  elements of which are the moduli of the
      c               absolute error estimates on the subintervals
      c            iord    - integer
      c               vector of dimension at least limit, the first k
      c               elements of which are pointers to the
      c               error estimates over the subintervals,
      c               such that elist(iord(1)), ...,
      c               elist(iord(k)) form a decreasing sequence,
      c               with k = last if last.le.(limit/2+2), and
      c               k = limit+1-last otherwise
      c            last    - integer
      c               number of subintervals actually produced in the
      c               subdivision process
      

Definition at line 586 of file gsl_inte_qag_b.h.


Public Member Functions

int set_wkspace (size_t size)
 Set the integration workspace size.
void initialise (gsl_integration_workspace *workspace, double a, double b)
 Initialize the workspace for an integration with limits a and b.
void set_initial_result (gsl_integration_workspace *workspace, double result, double error)
 Set the result at position zero.
void retrieve (const gsl_integration_workspace *workspace, double *a, double *b, double *r, double *e)
 Retrieve the ith result from the workspace.
void qpsrt (gsl_integration_workspace *workspace)
 Sort the workspace.
void update (gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
 Update workspace with new results and resort.
double sum_results (const gsl_integration_workspace *workspace)
 Add up all of the contributions to construct the final result.
int subinterval_too_small (double a1, double a2, double b2)
 Find out if the present subinterval is too small.
void append_interval (gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1)
 Append new results to workspace.

Data Fields

gsl_integration_workspace * w
 The integration workspace.
int wkspace
 The size of the integration workspace (default 1000).

Member Function Documentation

void qpsrt ( gsl_integration_workspace *  workspace  ) 

This routine maintains the descending ordering in the list of the local error estimated resulting from the interval subdivision process. at each call two error estimates are inserted using the sequential search method, top-down for the largest error estimate and bottom-up for the smallest error estimate.

Originally written in QUADPACK by

	piessens, robert, appl. math. & progr. div. - k.u.leuven
	de doncker, elise, appl. math. & progr. div. - k.u.leuven
	
translated into C for GSL by Brian Gough, and then rewritten for O2scl.

void retrieve ( const gsl_integration_workspace *  workspace,
double *  a,
double *  b,
double *  r,
double *  e 
)

The workspace variable i is used to specify which interval is requested.


The documentation for this class was generated from the following file:

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page