diff --git a/Project.toml b/Project.toml index a9fd907c9..e87fef4ea 100644 --- a/Project.toml +++ b/Project.toml @@ -17,7 +17,7 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" [compat] Aqua = "0.6" -ArnoldiMethod = "0.3" +ArnoldiMethod = "0.4" Compat = "3.40, 4" DataStructures = "0.17, 0.18" Documenter = "0.27" diff --git a/src/Graphs.jl b/src/Graphs.jl index 675db9eef..71df958f5 100644 --- a/src/Graphs.jl +++ b/src/Graphs.jl @@ -3,7 +3,7 @@ module Graphs using SimpleTraits ### Remove the following line once #915 is closed -using ArnoldiMethod +using ArnoldiMethod: LM, SR, LR, partialschur, partialeigen using Statistics: mean # Currently used to support the ismutable function that is not available in Julia < v1.7 diff --git a/src/Parallel/Parallel.jl b/src/Parallel/Parallel.jl index bc02917bf..6dc931231 100644 --- a/src/Parallel/Parallel.jl +++ b/src/Parallel/Parallel.jl @@ -5,7 +5,7 @@ using Graphs: sample, AbstractPathState, JohnsonState, BellmanFordState, FloydWa using Distributed: @distributed using Base.Threads: @threads, nthreads, Atomic, atomic_add!, atomic_cas! using SharedArrays: SharedMatrix, SharedVector, sdata -using ArnoldiMethod +using ArnoldiMethod: LM, SR, LR, partialschur, partialeigen using Random: AbstractRNG, shuffle import SparseArrays: sparse import Base: push!, popfirst!, isempty, getindex diff --git a/src/graphcut/normalized_cut.jl b/src/graphcut/normalized_cut.jl index b6e9aa376..3092ab1a7 100644 --- a/src/graphcut/normalized_cut.jl +++ b/src/graphcut/normalized_cut.jl @@ -1,4 +1,3 @@ -using ArnoldiMethod # computes normalized cut cost for partition `cut` function _normalized_cut_cost(cut, W::AbstractMatrix, D) cut_cost = zero(eltype(W)) diff --git a/src/linalg/LinAlg.jl b/src/linalg/LinAlg.jl index 37bf655bc..0ba601c1e 100644 --- a/src/linalg/LinAlg.jl +++ b/src/linalg/LinAlg.jl @@ -1,10 +1,10 @@ module LinAlg -using ArnoldiMethod +using ArnoldiMethod: LM, SR, LR, partialschur, partialeigen using SimpleTraits using SparseArrays: SparseMatrixCSC -import SparseArrays: blockdiag, sparse +import SparseArrays: blockdiag, sparse, spdiagm using LinearAlgebra: I, Symmetric, diagm, dot, eigen, eigvals, norm, rmul!, tril, triu import LinearAlgebra: Diagonal, diag, issymmetric, mul! diff --git a/src/linalg/spectral.jl b/src/linalg/spectral.jl index bcb555333..756a37dde 100644 --- a/src/linalg/spectral.jl +++ b/src/linalg/spectral.jl @@ -1,8 +1,5 @@ # This file provides reexported functions. -using ArnoldiMethod -using SparseArrays - """ adjacency_matrix(g[, T=Int; dir=:out]) diff --git a/src/shortestpaths/bellman-ford.jl b/src/shortestpaths/bellman-ford.jl index b896264d4..05fbdcf1a 100644 --- a/src/shortestpaths/bellman-ford.jl +++ b/src/shortestpaths/bellman-ford.jl @@ -8,7 +8,6 @@ # The type that encapsulates the state of Bellman Ford algorithm # ################################################################### -using Base.Threads struct NegativeCycleError <: Exception end diff --git a/src/shortestpaths/spfa.jl b/src/shortestpaths/spfa.jl index 82d465cbe..80636a6dc 100644 --- a/src/shortestpaths/spfa.jl +++ b/src/shortestpaths/spfa.jl @@ -6,8 +6,6 @@ # ################################################################### -using Base.Threads - """ spfa_shortest_paths(g, s, distmx=weights(g)) diff --git a/test/linalg/graphmatrices.jl b/test/linalg/graphmatrices.jl index cad436a93..e667124ad 100644 --- a/test/linalg/graphmatrices.jl +++ b/test/linalg/graphmatrices.jl @@ -1,5 +1,5 @@ # export test_adjacency, test_laplacian, test_accessors, test_arithmetic, test_other -using ArnoldiMethod +using ArnoldiMethod: LM, SR, LR, partialschur, partialeigen @testset "Graph matrices" begin diff --git a/test/linalg/spectral.jl b/test/linalg/spectral.jl index 7ea595fcf..dbe80f3f9 100644 --- a/test/linalg/spectral.jl +++ b/test/linalg/spectral.jl @@ -1,6 +1,6 @@ import Base: Matrix import Base: size -using ArnoldiMethod +using ArnoldiMethod: LM, SR, LR, partialschur, partialeigen # using Graphs.LinAlg: eigs # just so that we can assert equality of matrices