Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove SuiteSparse from dependencies #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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"
2 changes: 1 addition & 1 deletion src/calculus/epicomposeQuadratic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions src/functions/indAffine.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

using LinearAlgebra
using SparseArrays
using SuiteSparse

export IndAffine

Expand Down Expand Up @@ -43,7 +42,6 @@ end

using LinearAlgebra
using SparseArrays
using SuiteSparse

include("indAffineDirect.jl")
include("indAffineIterative.jl")
Expand Down
4 changes: 2 additions & 2 deletions src/functions/indAffineDirect.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down Expand Up @@ -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
##############################################################################
Expand Down
3 changes: 1 addition & 2 deletions src/functions/indGraphSparse.jl
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
3 changes: 1 addition & 2 deletions src/functions/leastSquaresDirect.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
5 changes: 2 additions & 3 deletions src/functions/quadraticDirect.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

using LinearAlgebra
using SparseArrays
using SuiteSparse

mutable struct QuadraticDirect{R, M, V, F} <: Quadratic
Q::M
Expand All @@ -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
Expand All @@ -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
Expand Down
Loading