Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
GiggleLiu committed Apr 17, 2024
1 parent f9b46fc commit 97f19a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PermMatrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ end
basetype(pm::PermMatrix) = PermMatrix
Base.getindex(M::PermMatrix{Tv}, i::Integer, j::Integer) where {Tv} =
M.perm[i] == j ? M.vals[i] : zero(Tv)
@propagate_inbounds function Base.setindex!(M::PermMatrix, val, i::Integer, j::Integer)
function Base.setindex!(M::PermMatrix, val, i::Integer, j::Integer)
@assert M.perm[i] == j "Can not set index due to the absense of entry: ($i, $j)"
@inbounds M.vals[i] = val
end
Expand Down Expand Up @@ -76,7 +76,7 @@ basetype(pm::PermMatrixCSC) = PermMatrixCSC
@boundscheck 0 < j <= size(M, 2)
@inbounds M.perm[j] == i ? M.vals[j] : zero(Tv)
end
@propagate_inbounds function Base.setindex!(M::PermMatrixCSC, val, i::Integer, j::Integer)
function Base.setindex!(M::PermMatrixCSC, val, i::Integer, j::Integer)
@assert M.perm[j] == i "Can not set index due to the absense of entry: ($i, $j)"
@inbounds M.vals[j] = val
end
Expand Down

0 comments on commit 97f19a0

Please sign in to comment.