@@ -216,7 +216,7 @@ Update element of the matrix with operation `op`.
216216It assumes that `op(0,0)==0`. If `v` is zero, no new
217217entry is created.
218218"""
219- function updateindex! (lnk:: SparseMatrixLNK{Tv, Ti} , op, v, i, j) where {Tv, Ti}
219+ function updateindex! (lnk:: SparseMatrixLNK{Tv, Ti} , op:: Op , v, i, j) where {Tv, Ti, Op }
220220 # Set the first column entry if it was not yet set.
221221 if lnk. rowval[j] == 0 && ! iszero (v)
222222 lnk. rowval[j] = i
@@ -243,7 +243,7 @@ Update element of the matrix with operation `op`.
243243It assumes that `op(0,0)==0`. If `v` is zero a new entry
244244is created nevertheless.
245245"""
246- function rawupdateindex! (lnk:: SparseMatrixLNK{Tv, Ti} , op, v, i, j) where {Tv, Ti}
246+ function rawupdateindex! (lnk:: SparseMatrixLNK{Tv, Ti} , op:: Op , v, i, j) where {Tv, Ti, Op }
247247 # Set the first column entry if it was not yet set.
248248 if lnk. rowval[j] == 0
249249 lnk. rowval[j] = i
@@ -278,13 +278,13 @@ SparseArrays.nnz(lnk::SparseMatrixLNK) = lnk.nnz
278278
279279# Struct holding pair of value and row
280280# number, for sorting
281- mutable struct ColEntry{Tv, Ti <: Integer }
281+ struct ColEntry{Tv, Ti <: Integer }
282282 rowval:: Ti
283283 nzval:: Tv
284284end
285285
286286# Comparison method for sorting
287- Base. isless (x:: ColEntry , y:: ColEntry ) = (x. rowval < y. rowval)
287+ Base. isless (x:: ColEntry{Tv, Ti} , y:: ColEntry{Tv, Ti} ) where {Tv, Ti} = (x. rowval < y. rowval)
288288
289289"""
290290$(TYPEDSIGNATURES)
0 commit comments