chaospy.quadrature.fejer_1

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

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

Fejér proposed two quadrature rules very similar to chaospy.quadrature.clenshaw_curtis(), except that it does not include endpoints, making it more suitable to integrate unbound interval.

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_1(3, (0, 1))
>>> abscissas.round(4)
array([[0.0381, 0.3087, 0.6913, 0.9619]])
>>> weights.round(4)
array([0.1321, 0.3679, 0.3679, 0.1321])
See also:

chaospy.quadrature.gaussian() chaospy.quadrature.clenshaw_curtis() chaospy.quadrature.fejer_2()