Skip to content

Commit 6a91bcc

Browse files
nsajkoKristofferC
authored andcommitted
cholmod: correct the IndexStyle method additions (#650)
(cherry picked from commit 306605d)
1 parent 53a30e5 commit 6a91bcc

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/solvers/cholmod.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,7 @@ end
13491349
size(F::Factor) = (size(F, 1), size(F, 2))
13501350
axes(A::Union{Dense,Sparse,Factor}) = map(Base.OneTo, size(A))
13511351

1352-
IndexStyle(::Dense) = IndexLinear()
1352+
IndexStyle(::Type{<:Dense}) = IndexLinear()
13531353

13541354
size(FC::FactorComponent, i::Integer) = size(FC.F, i)
13551355
size(FC::FactorComponent) = size(FC.F)
@@ -1370,7 +1370,6 @@ function getindex(A::Dense{T}, i::Integer) where {T<:VTypes}
13701370
unsafe_load(Ptr{T}(s.x), i)
13711371
end
13721372

1373-
IndexStyle(::Sparse) = IndexCartesian()
13741373
function getindex(A::Sparse{T}, i0::Integer, i1::Integer) where T
13751374
s = unsafe_load(typedpointer(A))
13761375
!(1 <= i0 <= s.nrow && 1 <= i1 <= s.ncol) && throw(BoundsError())

0 commit comments

Comments
 (0)