Skip to content

Commit

Permalink
Fence in BibTeX sections in docstrings
Browse files Browse the repository at this point in the history
BibTeX syntax is more easily viewed in monospace.
Moreover, these blocks are more likely to be
copied for use in users' .bib files.
  • Loading branch information
abhro committed Jul 1, 2024
1 parent 6d09028 commit ffa4683
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions 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
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

0 comments on commit ffa4683

Please sign in to comment.