Skip to content

Commit

Permalink
Merge pull request #250 from JuliaReach/schillic/using
Browse files Browse the repository at this point in the history
Collect `using`s and avoid `using` packages
  • Loading branch information
schillic authored Jun 2, 2024
2 parents 43ebb7d + 729b15a commit 836dc9c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
10 changes: 8 additions & 2 deletions src/IntervalMatrices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@ module IntervalMatrices
using LinearAlgebra
using LinearAlgebra: checksquare

import Random
using Random: AbstractRNG, GLOBAL_RNG, seed!
import Random: rand

import Base: copy, get,
+, -, *, /, \,
size, IndexStyle, getindex, setindex!,
similar, , , , , real, imag

using Reexport
@reexport using IntervalArithmetic
import IntervalArithmetic: inf, sup, mid, diam, radius, hull
@static if VERSION >= v"1.9"
vIA = pkgversion(IntervalArithmetic)
else
using PkgVersion
import PkgVersion
vIA = PkgVersion.Version(IntervalArithmetic)
end
if vIA >= v"0.21"
Expand Down
6 changes: 0 additions & 6 deletions src/matrix.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import Base: similar, , , , , real, imag
import Random: rand
import IntervalArithmetic: inf, sup, mid, diam, radius, hull

"""
AbstractIntervalMatrix{IT} <: AbstractMatrix{IT}
Expand Down Expand Up @@ -71,8 +67,6 @@ struct IntervalMatrix{T,IT,MT<:AbstractMatrix{IT}} <: AbstractIntervalMatrix{IT}
mat::MT
end

import Base: size, IndexStyle, getindex, setindex!, copy

IndexStyle(::Type{<:IntervalMatrix}) = IndexLinear()
size(M::IntervalMatrix) = size(M.mat)
getindex(M::IntervalMatrix, i::Int) = getindex(M.mat, i)
Expand Down
2 changes: 0 additions & 2 deletions src/operations/arithmetic.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Base: +, -, *, /, \

# =========================
# Addition operations
# =========================
Expand Down
2 changes: 0 additions & 2 deletions src/operations/power.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Base: copy, get

"""
IntervalMatrixPower{T}
Expand Down

0 comments on commit 836dc9c

Please sign in to comment.