We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe25f39 commit 64d2db6Copy full SHA for 64d2db6
1 file changed
src/Utilities/sparse_matrix.jl
@@ -210,6 +210,17 @@ _indexing(A::MutableSparseMatrixCSC) = A.indexing
210
211
_indexing(::SparseArrays.SparseMatrixCSC) = OneBasedIndexing()
212
213
+"""
214
+ _first_in_column(
215
+ A::Union{MutableSparseMatrixCSC,SparseArrays.SparseMatrixCSC},
216
+ row::Integer,
217
+ col::Integer,
218
+ )
219
+
220
+Return the index of the first non-zero entry in the column `col` that has a row
221
+index greater than or equal to `row`.
222
+If no such entry exists, return `last(SparseArrays.nzrange(A, col)) + 1`.
223
224
function _first_in_column(
225
A::Union{MutableSparseMatrixCSC,SparseArrays.SparseMatrixCSC},
226
row::Integer,
0 commit comments