Skip to content

Commit

Permalink
Merge pull request #259 from JuliaReach/auto-juliaformatter-pr
Browse files Browse the repository at this point in the history
Automatic JuliaFormatter.jl run
  • Loading branch information
schillic authored Sep 14, 2024
2 parents 76bb7e0 + c47fc6f commit dbec0aa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/operations/arithmetic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
\(M1::IntervalMatrix, M2::IntervalMatrix) = IntervalMatrix(M1.mat \ M2.mat)
# COV_EXCL_START
for T in (:AbstractMatrix, :Diagonal, :(Union{UpperTriangular,LowerTriangular}),
:(Union{UnitUpperTriangular,UnitLowerTriangular}), :SymTridiagonal, :Bidiagonal,
:(LinearAlgebra.HermOrSym), :(LinearAlgebra.AdjOrTrans{<:Any,<:Bidiagonal}))
:(Union{UnitUpperTriangular,UnitLowerTriangular}), :SymTridiagonal, :Bidiagonal,
:(LinearAlgebra.HermOrSym), :(LinearAlgebra.AdjOrTrans{<:Any,<:Bidiagonal}))
@eval begin
\(M1::IntervalMatrix, M2::$T) = IntervalMatrix(M1.mat \ M2)
\(M1::$T, M2::IntervalMatrix) = IntervalMatrix(M1 \ M2.mat)
Expand Down
4 changes: 2 additions & 2 deletions src/operations/mult.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ function set_multiplication_mode(multype)

# AbstractMatrix, incl. disambiguations
for T in (:AbstractMatrix, :(LinearAlgebra.AbstractTriangular),
:(Transpose{T, <:AbstractVector} where T), :Diagonal,
:(LinearAlgebra.Adjoint{T, <:AbstractVector} where T))
:(Transpose{T,<:AbstractVector} where {T}), :Diagonal,
:(LinearAlgebra.Adjoint{T,<:AbstractVector} where {T}))
@eval begin
*(A::IntervalMatrix, B::$T) = *($type, A, B)
*(A::$T, B::IntervalMatrix) = *($type, A, B)
Expand Down
6 changes: 3 additions & 3 deletions test/intervals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ end

@testset "Interval operation `intersect_interval`" begin
x = interval(1, 3)
for y in (interval(2, 4), interval(2f0, 4f0))
for y in (interval(2, 4), interval(2.0f0, 4.0f0))
@test intersect_interval(x, y) interval(2, 3)
end
@test intersect_interval(x, x) x
for y in (interval(4, 5), interval(4f0, 5f0))
for y in (interval(4, 5), interval(4.0f0, 5.0f0))
@test intersect_interval(x, y) emptyinterval(Float64)
end
end
Expand All @@ -47,5 +47,5 @@ end
end

@testset "Interval from a complex number" begin
@test interval(1+2im) isa Complex{Interval{Float64}}
@test interval(1 + 2im) isa Complex{Interval{Float64}}
end

0 comments on commit dbec0aa

Please sign in to comment.