JuliaLinearAlgebra/ArrayLayouts.jl

colsupport and rowsupport fail for lower symmetric banded matrices

KlausC opened this issue · 0 comments

This is the root cause for JuliaLinearAlgebra/BandedMatrices.jl#187 .

julia> A = Symmetric(BandedMatrix(0=>[4,4,4,4], -1=>[1,1,4]), :L)
4×4 Symmetric{Int64,BandedMatrix{Int64,Matrix{Int64},Base.OneTo{Int64}}}:
 4  ⋅  ⋅  ⋅
 ⋅  4  ⋅  ⋅
 ⋅  ⋅  4  ⋅
 ⋅  ⋅  ⋅  4

julia> rowsupport.(Ref(A), 1:4)
4-element Vector{UnitRange{Int64}}:
 1:1
 2:2
 3:3
 4:4

julia> colsupport.(Ref(A), 1:4)
4-element Vector{UnitRange{Int64}}:
 1:1
 2:2
 3:3
 4:4

we should have:

@test rowsupport.(A, 1) == 1:2 
@test rowsupport.(A, 2) == 1:3 
@test rowsupport.(A, 3) == 2:4 
@test rowsupport.(A, 4) == 3:4

same for colsupport.
Will start a PR for that.