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

Bd/sparse gauss #1606

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions src/Sparse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ include("Sparse/Module.jl")
include("Sparse/Trafo.jl")
include("Sparse/HNF.jl")
include("Sparse/Solve.jl")
include("Sparse/StructuredGauss.jl")
include("Sparse/UpperTriangular.jl")
include("Sparse/Rref.jl")
4 changes: 2 additions & 2 deletions src/Sparse/Matrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ end
Return the submatrix of $A$, where the rows correspond to $r$ and the columns
correspond to $c$.
"""
function sub(A::SMat{T}, r::AbstractUnitRange, c::AbstractUnitRange) where T
function sub(A::SMat{T}, r::AbstractRange, c::AbstractRange) where T
B = sparse_matrix(base_ring(A))
B.nnz = 0
B.c = length(c)
Expand All @@ -856,7 +856,7 @@ function sub(A::SMat{T}, r::AbstractUnitRange, c::AbstractUnitRange) where T
for j=1:length(ra.values)
if ra.pos[j] in c
push!(rw.values, ra.values[j])
push!(rw.pos, ra.pos[j]-first(c)+1)
push!(rw.pos, div(ra.pos[j]-first(c),step(c))+1)
end
end
push!(B, rw)
Expand Down
Loading
Loading