PolynomialQuadrature

class probnum.quad.PolynomialQuadrature(nodes, weights, bounds)

Bases: probnum.quad.Quadrature

Quadrature rule based on polynomial functions.

A polynomial quadrature rule is given by a collection of nodes, the roots of the polynomial function and a set of corresponding weights.

Parameters:
  • nodes (ndarray, shape=(n,d)) – Integration nodes.
  • weights (ndarray, shape=(n,)) – Integration weights.
  • bounds (ndarray, shape=(d, 2)) – Integration bounds.

See also

Clenshaw-Curtis
Clenshaw-Curtis quadrature rule.

Methods Summary

integrate(fun[, isvectorized]) Numerically integrate the function fun.

Methods Documentation

integrate(fun, isvectorized=False, **kwargs)[source]

Numerically integrate the function fun.

Parameters:
  • fun (callable) – Function to be integrated. Signature is fun(x, **kwargs) where x is either a float or an ndarray with shape (d,). If fun can be evaluated vectorized, the implementation expects signature fun(X, **kwargs) where X is is an ndarray of shape (n, d). Making use of vectorization is recommended wherever possible for improved speed of computation.
  • isvectorized (bool) – Whether integrand allows vectorised evaluation (i.e. evaluation of all nodes at once).
  • kwargs – Key-word arguments being passed down to fun at each evaluation. For example (hyper)parameters.