chaospy.quadrature.fejer_2

chaospy.quadrature.fejer_2(order, domain=(0, 1), growth=False, segments=1)[source]

Generate the quadrature abscissas and weights in Fejér type II quadrature.

Fejér proposed two quadrature rules very similar to chaospy.quadrature.clenshaw_curtis(). The only difference is that the endpoints are removed. That is, Fejér only used the interior extrema of the Chebyshev polynomials, i.e. the true stationary points. This makes this a better method for performing quadrature on infinite intervals, as the evaluation does not contain endpoint values.

Args:
order (int, numpy.ndarray):

Quadrature order.

domain (chaospy.Distribution, numpy.ndarray):

Either distribution or bounding of interval to integrate over.

growth (bool):

If True sets the growth rule for the quadrature rule to only include orders that enhances nested samples.

segments (int):

Split intervals into N subintervals and create a patched quadrature based on the segmented quadrature. Can not be lower than order. If 0 is provided, default to square root of order. Nested samples only exist when the number of segments are fixed.

Returns:
abscissas (numpy.ndarray):

The quadrature points for where to evaluate the model function with abscissas.shape == (len(dist), N) where N is the number of samples.

weights (numpy.ndarray):

The quadrature weights with weights.shape == (N,).

Notes:

Implemented as proposed by Waldvogel [2].

Example:
>>> abscissas, weights = chaospy.quadrature.fejer_2(3, (0, 1))
>>> abscissas.round(4)
array([[0.0955, 0.3455, 0.6545, 0.9045]])
>>> weights.round(4)
array([0.1804, 0.2996, 0.2996, 0.1804])
See also:

chaospy.quadrature.gaussian() chaospy.quadrature.clenshaw_curtis() chaospy.quadrature.fejer_1()