Skip to content

Commit 64d2db6

Browse files
committed
Add docstring
1 parent fe25f39 commit 64d2db6

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/Utilities/sparse_matrix.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,17 @@ _indexing(A::MutableSparseMatrixCSC) = A.indexing
210210

211211
_indexing(::SparseArrays.SparseMatrixCSC) = OneBasedIndexing()
212212

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+
"""
213224
function _first_in_column(
214225
A::Union{MutableSparseMatrixCSC,SparseArrays.SparseMatrixCSC},
215226
row::Integer,

0 commit comments

Comments
 (0)