Skip to content

Commit

Permalink
fix ambiguities with \
Browse files Browse the repository at this point in the history
  • Loading branch information
schillic committed Mar 5, 2024
1 parent 9356e6b commit 948e800
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/operations/arithmetic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ import Base: +, -, *, /, \
# left-division methods to avoid a stack overflow with the default behavior
# (there exist more precise approaches but are currently not implemented here)
\(M1::IntervalMatrix, M2::IntervalMatrix) = IntervalMatrix(M1.mat \ M2.mat)
\(M1::IntervalMatrix, M2::AbstractMatrix) = IntervalMatrix(M1.mat \ M2)
\(M1::AbstractMatrix, M2::IntervalMatrix) = IntervalMatrix(M1 \ M2.mat)
for T in (:AbstractMatrix, :Diagonal, :(Union{UpperTriangular,LowerTriangular}),
:(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)
end
end

"""
square(A::IntervalMatrix)
Expand Down

0 comments on commit 948e800

Please sign in to comment.