Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor documentation fixes #250

Merged
merged 5 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/basics/SampledIntegralProblem.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ method = TrapezoidalRule()
solve(problem, method)
```

The exact answer is of course \$ 1/3 \$.
The exact answer is of course ``1/3``.

## Details

Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/numerical_integrals.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ For example, we can create our own sine function by integrating the cosine funct
using Integrals
my_sin(x) = solve(IntegralProblem((x, p) -> cos(x), (0.0, x)), QuadGKJL()).u
x = 0:0.1:(2 * pi)
@. my_sin(x) ≈ sin(x)
all(@. my_sin(x) ≈ sin(x))
```

## Infinity handling
Expand Down
8 changes: 7 additions & 1 deletion src/algorithms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ allocate the buffer as this is handled automatically.

## References

```tex
@article{laurie1997calculation,
title={Calculation of Gauss-Kronrod quadrature rules},
author={Laurie, Dirk},
Expand All @@ -21,6 +22,7 @@ number={219},
pages={1133--1145},
year={1997}
}
```
"""
struct QuadGKJL{F, B} <: SciMLBase.AbstractIntegralAlgorithm
order::Int
Expand All @@ -44,6 +46,7 @@ you do not allocate the buffer as this is handled automatically.

## References

```tex
@article{genz1980remarks,
title={Remarks on algorithm 006: An adaptive algorithm for numerical integration over an N-dimensional rectangular region},
author={Genz, Alan C and Malik, Aftab Ahmad},
Expand All @@ -54,6 +57,7 @@ pages={295--302},
year={1980},
publisher={Elsevier}
}
```
"""
struct HCubatureJL{F, B} <: SciMLBase.AbstractIntegralAlgorithm
initdiv::Int
Expand Down Expand Up @@ -81,6 +85,7 @@ This algorithm can only integrate `Float64`-valued functions

## References

```tex
@article{lepage1978new,
title={A new algorithm for adaptive multidimensional integration},
author={Lepage, G Peter},
Expand All @@ -91,6 +96,7 @@ pages={192--203},
year={1978},
publisher={Elsevier}
}
```
"""
struct VEGAS{S} <: SciMLBase.AbstractIntegralAlgorithm
nbins::Int
Expand Down Expand Up @@ -143,7 +149,7 @@ function GaussLegendre(; n = 250, subintervals = 1, nodes = nothing, weights = n
end

"""
QuadratureRule(q; n=250)
QuadratureRule(q; n=250)

Algorithm to construct and evaluate a quadrature rule `q` of `n` points computed from the
inputs as `x, w = q(n)`. It assumes the nodes and weights are for the standard interval
Expand Down
10 changes: 10 additions & 0 deletions src/algorithms_extension.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Importance sampling is used to reduce variance.

## References

```tex
@article{lepage1978new,
title={A new algorithm for adaptive multidimensional integration},
author={Lepage, G Peter},
Expand All @@ -23,6 +24,7 @@ pages={192--203},
year={1978},
publisher={Elsevier}
}
```
"""
struct CubaVegas <: AbstractCubaAlgorithm
flags::Int
Expand All @@ -42,6 +44,7 @@ Importance sampling and subdivision are thus used to reduce variance.

## References

```tex
@article{hahn2005cuba,
title={Cuba—a library for multidimensional numerical integration},
author={Hahn, Thomas},
Expand All @@ -52,6 +55,7 @@ pages={78--95},
year={2005},
publisher={Elsevier}
}
```
"""
struct CubaSUAVE{R} <: AbstractCubaAlgorithm where {R <: Real}
flags::Int
Expand All @@ -70,6 +74,7 @@ Stratified sampling is used to reduce variance.

## References

```tex
@article{friedman1981nested,
title={A nested partitioning procedure for numerical multiple integration},
author={Friedman, Jerome H and Wright, Margaret H},
Expand All @@ -80,6 +85,7 @@ pages={76--92},
year={1981},
publisher={ACM New York, NY, USA}
}
```
"""
struct CubaDivonne{R1, R2, R3, R4} <:
AbstractCubaAlgorithm where {R1 <: Real, R2 <: Real, R3 <: Real, R4 <: Real}
Expand All @@ -105,6 +111,7 @@ Multidimensional h-adaptive integration from Cuba.jl.

## References

```tex
@article{berntsen1991adaptive,
title={An adaptive algorithm for the approximate calculation of multiple integrals},
author={Berntsen, Jarle and Espelid, Terje O and Genz, Alan},
Expand All @@ -115,6 +122,7 @@ pages={437--451},
year={1991},
publisher={ACM New York, NY, USA}
}
```
"""
struct CubaCuhre <: AbstractCubaAlgorithm
flags::Int
Expand Down Expand Up @@ -165,6 +173,7 @@ Defaults to `Cubature.INDIVIDUAL`, other options are

## References

```tex
@article{genz1980remarks,
title={Remarks on algorithm 006: An adaptive algorithm for numerical integration over an N-dimensional rectangular region},
author={Genz, Alan C and Malik, Aftab Ahmad},
Expand All @@ -175,6 +184,7 @@ pages={295--302},
year={1980},
publisher={Elsevier}
}
```
"""
struct CubatureJLh <: AbstractCubatureJLAlgorithm
error_norm::Int32
Expand Down
4 changes: 2 additions & 2 deletions src/algorithms_sampled.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Struct for evaluating an integral via the trapezoidal rule.

Example with sampled data:

```
```julia
using Integrals
f = x -> x^2
x = range(0, 1, length=20)
Expand All @@ -28,7 +28,7 @@ Simpson's composite 1/3 rule for non-equidistant grids.

Example with equidistant data:

```
```julia
using Integrals
f = x -> x^2
x = range(0, 1, length=20)
Expand Down
Loading