diff --git a/docs/Project.toml b/docs/Project.toml index bd5bf13..639f676 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,9 +1,7 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244" -IntervalArithmetic = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253" [compat] Documenter = "1" DocumenterCitations = "1.3" -IntervalArithmetic = "0.21, =0.21" # v0.22 changed the output format diff --git a/docs/src/index.md b/docs/src/index.md index b63803b..0a4d326 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -108,8 +108,8 @@ Then, at ``t = 1.0``, ```jldoctest quickstart julia> A + 1/2 * A^2 2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}: - [1.0, 4.50001] [-3.0, 2.0] - [-4.0, 2.50001] [-1.0, 9.0] + [0.5, 4.5] [-3.25, 2.5] + [-4.25, 3.0] [-2.25, 9.0] ``` However, that result is not tight. The computation can be performed exactly via single-use expressions implemented in this library: @@ -117,8 +117,8 @@ single-use expressions implemented in this library: ```jldoctest quickstart julia> quadratic_expansion(A, 1.0, 0.5) 2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}: - [1.0, 4.50001] [-2.0, 1.0] - [-3.0, 1.50001] [1.0, 7.0] + [1.0, 4.5] [-2.0, 1.0] + [-3.0, 1.5] [1.0, 7.0] ``` We now obtain an interval matrix that is strictly included in the one obtained from the naive multiplication. diff --git a/src/IntervalMatrices.jl b/src/IntervalMatrices.jl index 8bfae1d..3213c04 100644 --- a/src/IntervalMatrices.jl +++ b/src/IntervalMatrices.jl @@ -77,4 +77,11 @@ export AffineIntervalMatrix, set_multiplication_mode(config[:multiplication]) +function __init__() + @static if vIA >= v"0.22" + # remove interval decorations + setdisplay(; decorations=false, ng_flag=false) + end +end + end # module diff --git a/src/matrix.jl b/src/matrix.jl index 2842ca8..fec40b6 100644 --- a/src/matrix.jl +++ b/src/matrix.jl @@ -18,10 +18,10 @@ parameterized in the number field, the interval type, and the matrix type. ### Examples ```jldoctest -julia> A = IntervalMatrix([-1 .. -0.8 0 .. 0; 0 .. 0 -1 .. -0.8]) +julia> A = IntervalMatrix([interval(-1, -0.8) interval(0); interval(0) interval(-1, -0.8)]) 2×2 IntervalMatrix{Float64, Interval{Float64}, Matrix{Interval{Float64}}}: - [-1.0, -0.7999999] [0.0, 0.0] - [0.0, 0.0] [-1.0, -0.7999999] + [-1.0, -0.8] [0.0, 0.0] + [0.0, 0.0] [-1.0, -0.8] ``` An interval matrix proportional to the identity matrix can be built using the