Skip to content

Commit

Permalink
Merge pull request #205 from JuliaReach/lf-204
Browse files Browse the repository at this point in the history
fix #204
  • Loading branch information
schillic committed Feb 24, 2022
2 parents 173cfa9 + e45c4a1 commit 409769d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
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.8.2"
version = "0.8.3"

[deps]
IntervalArithmetic = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253"
Expand Down
9 changes: 9 additions & 0 deletions src/matrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,12 @@ function ±(C::MT, S::MT) where {T, MT<:AbstractMatrix{T}}

return IntervalMatrix(map((x, y) -> x ± y, C, S))
end

for op in (:Adjoint, :Bidiagonal, :Diagonal, :Hermitian,
:SymTridiagonal, :Symmetric, :Transpose, :Tridiagonal)
@eval LinearAlgebra.$op(A::IntervalMatrix) = IntervalMatrix($op(A.mat))
end

if VERSION >= v"1.3"
LinearAlgebra.UpperHessenberg(A::IntervalMatrix) = IntervalMatrix(UpperHessenberg(A.mat))
end
10 changes: 10 additions & 0 deletions test/constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,13 @@ end
@test m2 isa IntervalMatrix{Float64}
@test eltype(m2) == Complex{Interval{Float64}}
end

@testset "special matrices" begin
A = rand(IntervalMatrix)
Aₛ = Symmetric(A)

@test Aₛ isa IntervalMatrix
@test Aₛ.mat isa Symmetric

@test Matrix(Aₛ) isa Matrix
end

2 comments on commit 409769d

@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
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/55390

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.8.3 -m "<description of version>" 409769d701258b60c72410bdb665c73ee5a51553
git push origin v0.8.3

Please sign in to comment.