quadax.AbstractAdjoint.quadrature

abstractmethod AbstractAdjoint.quadrature(ops: QuadratureOps, interval: Array | tuple[Array, ...], args: tuple, consts: tuple, kwargs: dict, opts: dict) → tuple[Array, dict]Source

Evaluate the quadrature and define how it is differentiated.

Parameters:
  • ops (QuadratureOps) – Primitive operations for this quadrature method.

  • interval (jax.Array or tuple of jax.Array) – Limits of integration with possible breakpoints, in the original (unmapped) coordinates. One array for a one dimensional quadrature, one per axis for a cubature over a box.

  • args (tuple) – Extra arguments to the integrand.

  • consts (tuple) – Values closed over by the integrand, hoisted out by jax.closure_convert so that they are visible to AD.

  • kwargs (dict) – Additional keyword arguments passed to rule.

  • opts (dict) – Options for ops.solve, including the local rule and the tolerances.

Returns:

  • y (jax.Array) – The value of the integral.

  • state (dict) – Full state of the integrator.