Skip to content

Commit

Permalink
fix building of documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
schillic committed Oct 10, 2021
1 parent 21818cd commit 00c217d
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 16 deletions.
3 changes: 2 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ makedocs(
"Library" => Any[
"Types" => "lib/types.md",
"Methods" => "lib/methods.md"],
"About" => "about.md"
"About" => "about.md",
"References" => "references.md"
],
strict = true
)
Expand Down
14 changes: 7 additions & 7 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ julia> (-1.0..1.0) * A

Or compute the square of $A$,
```jldoctest quickstart
julia> A*A
julia> square(A)
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[2, 7] [-8, 0]
[-12, -1] [6, 22]
[2, 7] [-8, -1]
[-12, -2] [6, 22]
```
In these cases, the rules of interval arithmetic are used; see the wikipedia page
In these cases, the rules of interval arithmetic are used; see the Wikipedia page
on [interval arithmetic](https://en.wikipedia.org/wiki/Interval_arithmetic) for the
relevant definitions and algebraic rules that apply.

Expand All @@ -107,14 +107,14 @@ $e^{At} - I$. Then, at $t = 1.0$,
```jldoctest quickstart
julia> A + 1/2 * A^2
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[1, 4.5] [-3, 2]
[-4, 2.5] [-1, 9]
[0.5, 4.5] [-3.25, 2.5]
[-4.25, 3] [-2.25, 9]
```
However, that result is not tight. The computation can be performed exactly via
single-use expressions implemented in this library:

```jldoctest quickstart
julia> quadratic_expansion(A, 1.0)
julia> quadratic_expansion(A, 1.0, 0.5)
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[1, 4.5] [-2, 1]
[-3, 1.5] [1, 7]
Expand Down
16 changes: 13 additions & 3 deletions docs/src/lib/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,25 @@ inf
sup
mid
diam
radius
midpoint_radius
rand
sample
split
±
hull
```

## Arithmetic

```@docs
square
scale
scale!
set_multiplication_mode
```

## Matrix power
Expand Down
53 changes: 53 additions & 0 deletions docs/src/references.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# References

#### [RUM10]

```@raw html
<ul><li>
```
S.M. Rump, [*Verification methods: Rigorous results using floating-point arithmetic*](https://www.tuhh.de/ti3/paper/rump/Ru10.pdf), Acta Numerica, 19:287–449, 2010
```@raw html
<li style="list-style: none"><details>
<summary>bibtex</summary>
```
```
@article{rump2010verification,
title={Verification methods: Rigorous results using floating-point arithmetic},
author={Rump, Siegfried M},
journal={Acta Numerica},
volume={19},
pages={287--449},
year={2010},
publisher={Cambridge University Press}
}
```
```@raw html
</details></li></ul>
```
---

#### [RUM99]

```@raw html
<ul><li>
```
Rump, Siegfried M. [*Fast and parallel interval arithmetic*](https://www.tuhh.de/ti3/paper/rump/Ru99b.pdf), BIT Numerical Mathematics 39.3, 534-554, 1999
```@raw html
<li style="list-style: none"><details>
<summary>bibtex</summary>
```
```
@article{rump1999fast,
title={Fast and parallel interval arithmetic},
author={Rump, Siegfried M},
journal={BIT Numerical Mathematics},
volume={39},
number={3},
pages={534--554},
year={1999},
publisher={Springer}
}
```
```@raw html
</details></li></ul>
```
6 changes: 3 additions & 3 deletions src/matrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ i.e. `B[i, j] ≥ A[i, j]` for each `i` and `j`.
```jldoctest
julia> IntervalMatrix([1 2; 3 4], [1 2; 4 5])
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[1, 1] [2, 2]
[1, 1] [2, 2]
[3, 4] [4, 5]
```
"""
Expand All @@ -144,7 +144,7 @@ function IntervalMatrix(A::MT, B::MT) where {T, MT<:AbstractMatrix{T}}
"matrices should match, but they are $(size(A)) " *
"and $(size(B)) respectively"))

return map((x, y) -> Interval(x, y), A, B)
return IntervalMatrix(map((x, y) -> Interval(x, y), A, B))
end

"""
Expand Down Expand Up @@ -182,5 +182,5 @@ function ±(C::MT, S::MT) where {T, MT<:AbstractMatrix{T}}
"radii matrix should match, but they are $(size(C)) " *
"and $(size(S)) respectively"))

return map((x, y) -> x ± y, C, S)
return IntervalMatrix(map((x, y) -> x ± y, C, S))
end
4 changes: 2 additions & 2 deletions src/operations/power.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ julia> increment!(pow)
julia> increment(pow)
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[8, 8] [-1, 21]
[0, 0] [-1, 1]
[8, 8] [-1, 21]
[-0, 0] [-1, 1]
julia> get(pow)
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
Expand Down

0 comments on commit 00c217d

Please sign in to comment.