Skip to content

Commit

Permalink
add non mutating methods for droptol and dropzeros
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Aug 17, 2015
1 parent 344a77f commit 0acb2aa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions base/sparse/csparse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,9 @@ immutable TrilFun <: Func{4} end
call(::TrilFun, i,j,x,other) = i>=j - other

droptol!(A::SparseMatrixCSC, tol) = fkeep!(A, DropTolFun(), tol)
droptol(A::SparseMatrixCSC) = droptol!(copy(A))
dropzeros!(A::SparseMatrixCSC) = fkeep!(A, DropZerosFun(), nothing)
dropzeros(A::SparseMatrixCSC) = dropzeros!(copy(A))

function triu!(A::SparseMatrixCSC, k::Integer=0)
m,n = size(A)
Expand Down

0 comments on commit 0acb2aa

Please sign in to comment.