Skip to content

Commit

Permalink
Merge pull request #163 from JuliaReach/schillic/bump
Browse files Browse the repository at this point in the history
Update doctests to v1.6 & new release
  • Loading branch information
schillic committed Apr 18, 2021
2 parents 7eabf7c + 950fcb6 commit 868b21e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ os:

julia:
- 1.0
- 1.5
- 1.6
- nightly

cache:
Expand All @@ -34,7 +34,7 @@ matrix:
- julia: nightly
include:
- stage: "Documentation"
julia: 1.5
julia: 1.6
os: linux
script:
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()));
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "IntervalMatrices"
uuid = "5c1f47dc-42dd-5697-8aaa-4d102d140ba9"
version = "0.6.3"
version = "0.6.4"

[deps]
IntervalArithmetic = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253"
Expand Down
12 changes: 6 additions & 6 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ An *interval matrix* is a matrix whose coefficients are intervals. For instance,
julia> using IntervalMatrices
julia> A = IntervalMatrix([0..1 1..2; 2..3 -4.. -2])
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[0, 1] [1, 2]
[2, 3] [-4, -2]
```
Expand All @@ -74,23 +74,23 @@ of $A$,

```jldoctest quickstart
julia> 2A
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[0, 2] [2, 4]
[4, 6] [-8, -4]
```
Or an interval multiple of $A$,

```jldoctest quickstart
julia> (-1.0..1.0) * A
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[-1, 1] [-2, 2]
[-3, 3] [-4, 4]
```

Or compute the square of $A$,
```jldoctest quickstart
julia> A*A
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[2, 7] [-8, 0]
[-12, -1] [6, 22]
```
Expand All @@ -106,7 +106,7 @@ $e^{At} - I$. Then, at $t = 1.0$,

```jldoctest quickstart
julia> A + 1/2 * A^2
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[1, 4.5] [-3, 2]
[-4, 2.5] [-1, 9]
```
Expand All @@ -115,7 +115,7 @@ single-use expressions implemented in this library:

```jldoctest quickstart
julia> quadratic_expansion(A, 1.0)
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[1, 4.5] [-2, 1]
[-3, 1.5] [1, 7]
```
Expand Down
12 changes: 6 additions & 6 deletions src/matrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ parametrized in the number field, the interval type, and the matrix type.
```jldoctest
julia> A = IntervalMatrix([-0.9±0.1 0±0; 0±0 -0.9±0.1])
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[-1, -0.799999] [0, 0]
[0, 0] [-1, -0.799999]
```
Expand All @@ -35,7 +35,7 @@ An interval matrix proportional to the identity matrix can be built using the
julia> using LinearAlgebra
julia> IntervalMatrix(Interval(1)*I, 2)
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[1, 1] [0, 0]
[0, 0] [1, 1]
```
Expand All @@ -45,12 +45,12 @@ The number of columns can be specified as a third argument, creating a rectangul
```jldoctest interval_uniform_scaling
julia> IntervalMatrix(Interval(-1, 1)*I, 2, 3)
2×3 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
2×3 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[-1, 1] [0, 0] [0, 0]
[0, 0] [-1, 1] [0, 0]
julia> IntervalMatrix(Interval(-1, 1)*I, 3, 2)
3×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
3×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[-1, 1] [0, 0]
[0, 0] [-1, 1]
[0, 0] [0, 0]
Expand All @@ -62,7 +62,7 @@ An uninitialized interval matrix can be constructed using `undef`:
julia> m = IntervalMatrix{Float64}(undef, 2, 2);
julia> typeof(m)
IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}
IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}
```
Note that this constructor implicitly uses a dense matrix, `Matrix{Float64}`,
as the matrix (`mat`) field in the new interval matrix.
Expand Down Expand Up @@ -125,7 +125,7 @@ The radii matrix should be nonnegative, i.e. `S[i, j] ≥ 0` for each `i` and `j
```jldoctest
julia> IntervalMatrix([1 2; 3 4], [1 2; 4 5])
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[0, 2] [0, 4]
[-1, 7] [-1, 9]
```
Expand Down
10 changes: 5 additions & 5 deletions src/power.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,32 @@ The internal representation (such as the fields) are subject to future changes.
```jldoctest
julia> A = IntervalMatrix([2.0..2.0 2.0..3.0; 0.0..0.0 -1.0..1.0])
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[2, 2] [2, 3]
[0, 0] [-1, 1]
julia> pow = IntervalMatrixPower(A);
julia> increment!(pow)
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[4, 4] [2, 9]
[0, 0] [0, 1]
julia> increment(pow)
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[8, 8] [-1, 21]
[0, 0] [-1, 1]
julia> get(pow)
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[4, 4] [2, 9]
[0, 0] [0, 1]
julia> index(pow)
2
julia> base(pow)
2×2 IntervalMatrix{Float64,Interval{Float64},Array{Interval{Float64},2}}:
2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}:
[2, 2] [2, 3]
[0, 0] [-1, 1]
Expand Down

2 comments on commit 868b21e

@schillic
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/34627

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.6.4 -m "<description of version>" 868b21ef0ac71713229da7f28f75c249dfb357f2
git push origin v0.6.4

Please sign in to comment.