diff --git a/README.md b/README.md index 202ea48..a78ee47 100644 --- a/README.md +++ b/README.md @@ -80,10 +80,15 @@ Compute the (1d) integral of f(x) from `a` to `b`. The return value of `hcubature` is a tuple `(I, E)` of the estimated integral `I` and an estimated error `E`. -The other parameters are the same as [`hcubature`](@ref). `hquadrature`` +The other parameters are the same as `hcubature` (above). `hquadrature`` is just a convenience wrapper around `hcubature` so that you can work with scalar `x`, `a`, and `b`, rather than 1-component vectors. +Alternatively, for 1d integrals you can import the [QuadGK](https://github.com/JuliaMath/QuadGK.jl) module +and call the [`quadgk`](https://juliamath.github.io/QuadGK.jl/stable/#QuadGK.quadgk) function, which provides additional flexibility +e.g. in choosing the order of the quadrature rule. (`QuadGK` is used +internally anyway by `HCubature` to compute the quadrature rule.) + ## Algorithm The algorithm of `hquadrature` is based on the one described in: diff --git a/src/HCubature.jl b/src/HCubature.jl index a198947..e358d13 100644 --- a/src/HCubature.jl +++ b/src/HCubature.jl @@ -163,6 +163,10 @@ return value of `hcubature` is a tuple `(I, E)` of the estimated integral The other parameters are the same as [`hcubature`](@ref). `hquadrature`` is just a convenience wrapper around `hcubature` so that you can work with scalar `x`, `a`, and `b`, rather than 1-component vectors. + +Alternatively, for 1d integrals you can import the [`QuadGK`](@ref) module +and call the [`quadgk`](@ref) function, which provides additional flexibility +e.g. in choosing the order of the quadrature rule. """ hquadrature(f, a, b; norm=vecnorm, rtol::Real=0, atol::Real=0, maxevals::Integer=typemax(Int)) =