Package jdistlib.math

Class Integrate

java.lang.Object
jdistlib.math.Integrate

public class Integrate extends Object
Adaptive numerical integration corresponding to R 4.6.1 stats::integrate. Finite intervals use QUADPACK dqags; infinite intervals use dqagi. Invocation state is call-local.
  • Method Details

    • integrate

      public static IntegrationResult integrate(UnivariateFunction f, double lower, double upper)
      Integrates f over a finite, semi-infinite, or infinite interval. The defaults match R's integrate: 100 subdivisions and .Machine$double.eps^.25 absolute and relative tolerances.
    • integrateImmutable

      public static ImmutableIntegrationResult integrateImmutable(UnivariateFunction f, double lower, double upper)
      Integrates with hardened defaults and returns an immutable modern result.
    • integrateImmutable

      public static ImmutableIntegrationResult integrateImmutable(UnivariateFunction f, double lower, double upper, IntegrationOptions options)
      Integrates with hardened options and returns an immutable modern result.
    • integrate

      public static IntegrationResult integrate(UnivariateFunction f, double lower, double upper, double epsabs, double epsrel, int limit)
      Integrates f with QUADPACK-compatible status codes. All work arrays are local to the invocation, so concurrent calls are safe.
    • integrate

      public static IntegrationResult integrate(UnivariateFunction f, double lower, double upper, IntegrationOptions options)
      Integrates with hardened callback handling, evaluation budgets, optional breakpoints, cancellation, and selectable quadrature methods. The legacy overloads remain unchanged for R/QUADPACK compatibility.
    • assessStability

      public static IntegrationStabilityResult assessStability(UnivariateFunction f, double lower, double upper, IntegrationOptions options)
      Repeats an integral with tighter tolerances and an additional midpoint split. Agreement is a useful stability check, but is not a proof of correctness or convergence.