PolynomialQuadrature¶
-
class
probnum.quad.PolynomialQuadrature(nodes, weights, bounds)¶ Bases:
probnum.quad.QuadratureQuadrature 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)wherexis either a float or anndarraywith shape (d,). Iffuncan be evaluated vectorized, the implementation expects signaturefun(X, **kwargs)whereXis is anndarrayof 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
funat each evaluation. For example (hyper)parameters.
- fun (callable) – Function to be integrated. Signature is