Skip to content

Commit 26f0f73

Browse files
Merge pull request #250 from abhro/patch-1
Minor documentation fixes
2 parents 0c2611f + ffa4683 commit 26f0f73

File tree

5 files changed

+21
-5
lines changed

5 files changed

+21
-5
lines changed

docs/src/basics/SampledIntegralProblem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ method = TrapezoidalRule()
2424
solve(problem, method)
2525
```
2626

27-
The exact answer is of course \$ 1/3 \$.
27+
The exact answer is of course ``1/3``.
2828

2929
## Details
3030

docs/src/tutorials/numerical_integrals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ For example, we can create our own sine function by integrating the cosine funct
125125
using Integrals
126126
my_sin(x) = solve(IntegralProblem((x, p) -> cos(x), (0.0, x)), QuadGKJL()).u
127127
x = 0:0.1:(2 * pi)
128-
@. my_sin(x) ≈ sin(x)
128+
all(@. my_sin(x) ≈ sin(x))
129129
```
130130

131131
## Infinity handling

src/algorithms.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ allocate the buffer as this is handled automatically.
1212
1313
## References
1414
15+
```tex
1516
@article{laurie1997calculation,
1617
title={Calculation of Gauss-Kronrod quadrature rules},
1718
author={Laurie, Dirk},
@@ -21,6 +22,7 @@ number={219},
2122
pages={1133--1145},
2223
year={1997}
2324
}
25+
```
2426
"""
2527
struct QuadGKJL{F, B} <: SciMLBase.AbstractIntegralAlgorithm
2628
order::Int
@@ -44,6 +46,7 @@ you do not allocate the buffer as this is handled automatically.
4446
4547
## References
4648
49+
```tex
4750
@article{genz1980remarks,
4851
title={Remarks on algorithm 006: An adaptive algorithm for numerical integration over an N-dimensional rectangular region},
4952
author={Genz, Alan C and Malik, Aftab Ahmad},
@@ -54,6 +57,7 @@ pages={295--302},
5457
year={1980},
5558
publisher={Elsevier}
5659
}
60+
```
5761
"""
5862
struct HCubatureJL{F, B} <: SciMLBase.AbstractIntegralAlgorithm
5963
initdiv::Int
@@ -81,6 +85,7 @@ This algorithm can only integrate `Float64`-valued functions
8185
8286
## References
8387
88+
```tex
8489
@article{lepage1978new,
8590
title={A new algorithm for adaptive multidimensional integration},
8691
author={Lepage, G Peter},
@@ -91,6 +96,7 @@ pages={192--203},
9196
year={1978},
9297
publisher={Elsevier}
9398
}
99+
```
94100
"""
95101
struct VEGAS{S} <: SciMLBase.AbstractIntegralAlgorithm
96102
nbins::Int
@@ -143,7 +149,7 @@ function GaussLegendre(; n = 250, subintervals = 1, nodes = nothing, weights = n
143149
end
144150

145151
"""
146-
QuadratureRule(q; n=250)
152+
QuadratureRule(q; n=250)
147153
148154
Algorithm to construct and evaluate a quadrature rule `q` of `n` points computed from the
149155
inputs as `x, w = q(n)`. It assumes the nodes and weights are for the standard interval

src/algorithms_extension.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Importance sampling is used to reduce variance.
1313
1414
## References
1515
16+
```tex
1617
@article{lepage1978new,
1718
title={A new algorithm for adaptive multidimensional integration},
1819
author={Lepage, G Peter},
@@ -23,6 +24,7 @@ pages={192--203},
2324
year={1978},
2425
publisher={Elsevier}
2526
}
27+
```
2628
"""
2729
struct CubaVegas <: AbstractCubaAlgorithm
2830
flags::Int
@@ -42,6 +44,7 @@ Importance sampling and subdivision are thus used to reduce variance.
4244
4345
## References
4446
47+
```tex
4548
@article{hahn2005cuba,
4649
title={Cuba—a library for multidimensional numerical integration},
4750
author={Hahn, Thomas},
@@ -52,6 +55,7 @@ pages={78--95},
5255
year={2005},
5356
publisher={Elsevier}
5457
}
58+
```
5559
"""
5660
struct CubaSUAVE{R} <: AbstractCubaAlgorithm where {R <: Real}
5761
flags::Int
@@ -70,6 +74,7 @@ Stratified sampling is used to reduce variance.
7074
7175
## References
7276
77+
```tex
7378
@article{friedman1981nested,
7479
title={A nested partitioning procedure for numerical multiple integration},
7580
author={Friedman, Jerome H and Wright, Margaret H},
@@ -80,6 +85,7 @@ pages={76--92},
8085
year={1981},
8186
publisher={ACM New York, NY, USA}
8287
}
88+
```
8389
"""
8490
struct CubaDivonne{R1, R2, R3, R4} <:
8591
AbstractCubaAlgorithm where {R1 <: Real, R2 <: Real, R3 <: Real, R4 <: Real}
@@ -105,6 +111,7 @@ Multidimensional h-adaptive integration from Cuba.jl.
105111
106112
## References
107113
114+
```tex
108115
@article{berntsen1991adaptive,
109116
title={An adaptive algorithm for the approximate calculation of multiple integrals},
110117
author={Berntsen, Jarle and Espelid, Terje O and Genz, Alan},
@@ -115,6 +122,7 @@ pages={437--451},
115122
year={1991},
116123
publisher={ACM New York, NY, USA}
117124
}
125+
```
118126
"""
119127
struct CubaCuhre <: AbstractCubaAlgorithm
120128
flags::Int
@@ -165,6 +173,7 @@ Defaults to `Cubature.INDIVIDUAL`, other options are
165173
166174
## References
167175
176+
```tex
168177
@article{genz1980remarks,
169178
title={Remarks on algorithm 006: An adaptive algorithm for numerical integration over an N-dimensional rectangular region},
170179
author={Genz, Alan C and Malik, Aftab Ahmad},
@@ -175,6 +184,7 @@ pages={295--302},
175184
year={1980},
176185
publisher={Elsevier}
177186
}
187+
```
178188
"""
179189
struct CubatureJLh <: AbstractCubatureJLAlgorithm
180190
error_norm::Int32

src/algorithms_sampled.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Struct for evaluating an integral via the trapezoidal rule.
77
88
Example with sampled data:
99
10-
```
10+
```julia
1111
using Integrals
1212
f = x -> x^2
1313
x = range(0, 1, length=20)
@@ -28,7 +28,7 @@ Simpson's composite 1/3 rule for non-equidistant grids.
2828
2929
Example with equidistant data:
3030
31-
```
31+
```julia
3232
using Integrals
3333
f = x -> x^2
3434
x = range(0, 1, length=20)

0 commit comments

Comments
 (0)