Public Member Functions
GKData< Real > Class Template Reference

Gauss-Kronrod data the floating-point template parameter. More...

#include <gkdata.hpp>

List of all members.

Public Member Functions

 GKData (Real MACHEPS, size_t m=10)
 Computes data for (2m+1)-point Gauss-Kronrod quadrature.
size_t size ()
 Size of arrays of Gauss-Kronrod abscissae and weights.
Real xgk (int k)
 Array of Gauss-Kronrod abscissae in (0, 1); QUADPACK convention.
Real wgk (int k)
 Array of corresponding Gauss-Kronrod weights; QUADPACK convention.
Real wg (int k)
 Gauss-Legendre weights for odd indexed abscissae; QUADPACK convention.

Detailed Description

template<class Real>
class GKData< Real >

The Gauss-Kronrod abscissae consist of 2m+1 points $x_1 < \cdots < x_{2m+1}$ in the interval (-1, 1) used for a low-order and a high-order quadrature rule:

\[ Q_m^G f = \sum_{k=1}^m a_k f(x_{2k}), \qquad Q_m^{GK} f = \sum_{k=1}^{2m+1} b_k f(x_k). \]

The weights and abscissae are stored according to compact QUADPACK convention. Due to symmetry, the positive abscissae $x_{2m+1}$, $x_{2m}$,..., $x_m$ are returned as values xgk(0), xgk(1),..., xgk(m+1) respectively. Note the reverse order. The corresponding weights $b_{2m+1}$, $b_{2m}$,..., $b_m$ are returned by the respective values of wgk(). The weights $a_m$, $a_{m-1}$,..., corresponding to the even-indexed $x_{2m}$, $x_{2m-2}$, ...., are returned by the values of wg() in their reverse order.

Computational details

The even-indexed abscissae $x_2$, ..., $x_{2m}$ are the zeros of the m-th Legendre polynomial $P_m$. The odd indexed points are zeros of a polynomial that is represented as a Chebyshev sum,

\[ E_{m+1} = T_{m+1} + c_{m-1}T_{m-1} + c_{m-3} T_{m-3} + \cdots, \]

whose coefficients are defined by explicit formulae in

The zeros of both of these polynomials are computed by Newton's method. Upper bounds for their round-off errors, as functions of machine epsilon, are incorporated in the stopping criteria for for the root finders.

The weights $a_1$, ..., $a_m$ are Gauss-Legendre weights. The $b_k$ are given by the formulae

\[ b_{2k} = a_k + \frac{2 p_m}{(2m+1)t_{m+1} P_m'(x_{2k}) E_{m+1}(x_{2k})}, \qquad k = 1,\ldots,m, \]


\[ b_{2k+1} = \frac{2 p_m}{(2m+1) t_{m+1} P_m(x_{2k+1}) E_{m+1}'(x_{2k+1})}, \qquad k = 0, \ldots, m, \]

where $p_m$ and $t_{m+1}$ are the leading coefficients of the polynomials $P_m$ and $T_{m+1}$ respectively. These are from

The documentation for this class was generated from the following file:
 All Classes Functions Variables