{{ message }}
/ Integrals.jl Public

A common interface for quadrature and numerical integration for the SciML scientific machine learning organization

# SciML/Integrals.jl

Switch branches/tags
Nothing to show

## Latest commit

`doc unification`
`806fdf0`

## Files

Failed to load latest commit information.
Type
Name
Commit time
Jun 23, 2022
Aug 16, 2022
Jun 23, 2022
Jun 23, 2022
Jun 23, 2022
Sep 12, 2019
Aug 12, 2019
Nov 21, 2019
Aug 12, 2019

# Integrals.jl

Integrals.jl is an instantiation of the SciML common `IntegralProblem` interface for the common numerical integration packages of Julia, including both those based upon quadrature as well as Monte-Carlo approaches. By using Integrals.jl, you get a single predictable interface where many of the arguments are standardized throughout the various integrator libraries. This can be useful for benchmarking or for library implementations, since libraries which internally use a quadrature can easily accept a integration method as an argument.

## Tutorials and Documentation

For information on using the package, see the stable documentation. Use the in-development documentation for the version of the documentation, which contains the unreleased features.

## Examples

For basic multidimensional quadrature we can construct and solve a `IntegralProblem`:

```using Integrals
f(x,p) = sum(sin.(x))
prob = IntegralProblem(f,ones(2),3ones(2))
sol = solve(prob,HCubatureJL(),reltol=1e-3,abstol=1e-3)```

If we would like to parallelize the computation, we can use the batch interface to compute multiple points at once. For example, here we do allocation-free multithreading with Cubature.jl:

```using Integrals, Cubature, Base.Threads
function f(dx,x,p)
dx[i] = sum(sin.(@view(x[:,i])))
end
end
prob = IntegralProblem(f,ones(2),3ones(2),batch=2)
sol = solve(prob,CubatureJLh(),reltol=1e-3,abstol=1e-3)```

If we would like to compare the results against Cuba.jl's `Cuhre` method, then the change is a one-argument change:

```using IntegralsCuba
sol = solve(prob,CubaCuhre(),reltol=1e-3,abstol=1e-3)```

A common interface for quadrature and numerical integration for the SciML scientific machine learning organization

v3.1.1 Latest
Jul 30, 2022