Skip to content

Commit

Permalink
Extend generic sparse map[!]/broadcast[!] to sparse vectors and spars…
Browse files Browse the repository at this point in the history
…e vector/matrix combinations.

Extend generic sparse map[!]/broadcast[!] to sparse vectors and sparse vector/matrix combinations. Do so by introducing a common interface to SparseVector and SparseMatrixCSC for the purposes of map[!]/broadcast[!], and rewriting sparse map[!]/broadcast[!] against that interface. Relocate that code to a separate file/module base/sparse/higherorderfns.jl/SparseArrays.HigherOrderFns, loaded after definition of both SparseVector and SparseMatrixCSC.
  • Loading branch information
Sacha0 committed Dec 27, 2016
1 parent d8a5718 commit 8f61446
Show file tree
Hide file tree
Showing 4 changed files with 853 additions and 763 deletions.
2 changes: 1 addition & 1 deletion base/sparse/abstractsparse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ issparse{T, A<:AbstractSparseMatrix}(S::LinAlg.UnitLowerTriangular{T, A}) = true
issparse{T, A<:AbstractSparseMatrix}(S::UpperTriangular{T, A}) = true
issparse{T, A<:AbstractSparseMatrix}(S::LinAlg.UnitUpperTriangular{T, A}) = true

indtype{Tv,Ti}(S::AbstractSparseArray{Tv,Ti}) = Ti
indtype{Tv,Ti}(S::AbstractSparseArray{Tv,Ti}) = (Base.@_pure_meta; Ti)
Loading

0 comments on commit 8f61446

Please sign in to comment.