diff --git a/Project.toml b/Project.toml index cfb96db..14eafac 100644 --- a/Project.toml +++ b/Project.toml @@ -8,7 +8,6 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" OSQP = "ab2f91bb-94b4-55e3-9ba0-7f65df51de79" ProximalCore = "dc4f5ac2-75d1-4f31-931e-60435d74994b" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -SuiteSparse = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" TSVD = "9449cd9e-2762-5aa3-a617-5413e99d722e" [compat] @@ -17,6 +16,5 @@ LinearAlgebra = "1.4" OSQP = "0.3 - 0.8" ProximalCore = "0.1" SparseArrays = "1.4" -SuiteSparse = "1.4" TSVD = "0.3 - 0.4" julia = "1.4" diff --git a/src/calculus/epicomposeQuadratic.jl b/src/calculus/epicomposeQuadratic.jl index 208f01b..c89b0ce 100644 --- a/src/calculus/epicomposeQuadratic.jl +++ b/src/calculus/epicomposeQuadratic.jl @@ -19,7 +19,7 @@ end function EpicomposeQuadratic(L, Q::P, q) where {R, P <: SparseMatrixCSC{R}} return EpicomposeQuadratic{ - SuiteSparse.CHOLMOD.Factor{R}, typeof(L), P, typeof(q), real(eltype(L)) + SparseArrays.CHOLMOD.Factor{R}, typeof(L), P, typeof(q), real(eltype(L)) }(L, Q, q) end diff --git a/src/functions/indAffine.jl b/src/functions/indAffine.jl index 9dda046..16e1364 100644 --- a/src/functions/indAffine.jl +++ b/src/functions/indAffine.jl @@ -2,7 +2,6 @@ using LinearAlgebra using SparseArrays -using SuiteSparse export IndAffine @@ -43,7 +42,6 @@ end using LinearAlgebra using SparseArrays -using SuiteSparse include("indAffineDirect.jl") include("indAffineIterative.jl") diff --git a/src/functions/indAffineDirect.jl b/src/functions/indAffineDirect.jl index 2f1e4c0..aa8d60b 100644 --- a/src/functions/indAffineDirect.jl +++ b/src/functions/indAffineDirect.jl @@ -22,7 +22,7 @@ end IndAffineDirect(A::M, b::V) where {T, M <: DenseMatrix{T}, V} = IndAffineDirect{M, V, QRCompactWY{T, M}}(A, b) -IndAffineDirect(A::M, b::V) where {T, M <: SparseMatrixCSC{T}, V} = IndAffineDirect{M, V, SuiteSparse.SPQR.Factorization{T}}(A, b) +IndAffineDirect(A::M, b::V) where {T, M <: SparseMatrixCSC{T}, V} = IndAffineDirect{M, V, SparseArrays.SPQR.Factorization{T}}(A, b) IndAffineDirect(a::V, b::T) where {T, V <: AbstractVector{T}} = IndAffineDirect(reshape(a,1,:), [b]) @@ -52,7 +52,7 @@ function prox!(::Type{<:QRCompactWY}, y, f::IndAffineDirect, x, gamma) return real(eltype(x))(0) end -function prox!(::Type{<:SuiteSparse.SPQR.Factorization}, y, f::IndAffineDirect, x, gamma) +function prox!(::Type{<:SparseArrays.SPQR.Factorization}, y, f::IndAffineDirect, x, gamma) mul!(f.res, f.A, x) f.res .= f.b .- f.res ############################################################################## diff --git a/src/functions/indGraphSparse.jl b/src/functions/indGraphSparse.jl index da52e36..e322946 100644 --- a/src/functions/indGraphSparse.jl +++ b/src/functions/indGraphSparse.jl @@ -1,12 +1,11 @@ using LinearAlgebra using SparseArrays -using SuiteSparse struct IndGraphSparse{T, Ti} <: IndGraph m::Int n::Int A::SparseMatrixCSC{T, Ti} - F::SuiteSparse.CHOLMOD.Factor{T} #LDL factorization + F::SparseArrays.CHOLMOD.Factor{T} #LDL factorization tmp::Vector{T} tmpx::SubArray{T, 1, Vector{T}, Tuple{UnitRange{Int}}, true} res::Vector{T} diff --git a/src/functions/leastSquaresDirect.jl b/src/functions/leastSquaresDirect.jl index cf4a829..e991cc7 100644 --- a/src/functions/leastSquaresDirect.jl +++ b/src/functions/leastSquaresDirect.jl @@ -5,7 +5,6 @@ using LinearAlgebra using SparseArrays -using SuiteSparse mutable struct LeastSquaresDirect{N, R, C, M, V, F, IsConvex} <: LeastSquares A::M # m-by-n @@ -46,7 +45,7 @@ end function LeastSquaresDirect(A::M, b, lambda) where M <: SparseMatrixCSC C = eltype(M) R = real(C) - LeastSquaresDirect{ndims(b), R, C, M, typeof(b), SuiteSparse.CHOLMOD.Factor{C}, lambda >= 0}(A, b, R(lambda)) + LeastSquaresDirect{ndims(b), R, C, M, typeof(b), SparseArrays.CHOLMOD.Factor{C}, lambda >= 0}(A, b, R(lambda)) end function LeastSquaresDirect(A::Union{Transpose, Adjoint}, b, lambda) diff --git a/src/functions/quadraticDirect.jl b/src/functions/quadraticDirect.jl index e0ec000..c3fcdb4 100644 --- a/src/functions/quadraticDirect.jl +++ b/src/functions/quadraticDirect.jl @@ -4,7 +4,6 @@ using LinearAlgebra using SparseArrays -using SuiteSparse mutable struct QuadraticDirect{R, M, V, F} <: Quadratic Q::M @@ -22,7 +21,7 @@ end function QuadraticDirect(Q::M, q) where M <: SparseMatrixCSC R = eltype(M) - QuadraticDirect{R, M, typeof(q), SuiteSparse.CHOLMOD.Factor{R}}(Q, q) + QuadraticDirect{R, M, typeof(q), SparseArrays.CHOLMOD.Factor{R}}(Q, q) end function QuadraticDirect(Q::M, q) where M <: DenseMatrix @@ -49,7 +48,7 @@ function prox!(y, f::QuadraticDirect{R, M, V, <:Cholesky}, x, gamma) where {R, M return fy end -function prox!(y, f::QuadraticDirect{R, M, V, <:SuiteSparse.CHOLMOD.Factor}, x, gamma) where {R, M, V} +function prox!(y, f::QuadraticDirect{R, M, V, <:SparseArrays.CHOLMOD.Factor}, x, gamma) where {R, M, V} if gamma != f.gamma factor_step!(f, gamma) end