Revision 8ca5b943255f97503cd62faa6d66582b72a45b72 authored by Elliot Saba on 05 November 2020, 19:50:26 UTC, committed by GitHub on 05 November 2020, 19:50:26 UTC
1 parent cd33115
SuiteSparse.jl
# This file is a part of Julia. License is MIT: https://julialang.org/license
module SuiteSparse
import Base: \
import LinearAlgebra: ldiv!, rdiv!
## Functions to switch to 0-based indexing to call external sparse solvers
# Convert from 1-based to 0-based indices
function decrement!(A::AbstractArray{T}) where T<:Integer
for i in eachindex(A); A[i] -= oneunit(T) end
A
end
decrement(A::AbstractArray{<:Integer}) = decrement!(copy(A))
# Convert from 0-based to 1-based indices
function increment!(A::AbstractArray{T}) where T<:Integer
for i in eachindex(A); A[i] += oneunit(T) end
A
end
increment(A::AbstractArray{<:Integer}) = increment!(copy(A))
if Base.USE_GPL_LIBS
include("umfpack.jl")
include("cholmod.jl")
include("spqr.jl")
include("deprecated.jl")
end
end # module SuiteSparse
Computing file changes ...