JuliaLang/julia — pull request #6696 by tanmaykm (2014-04-30 09:21:57+00:00)
Title: SparseVector Type

This WIP PR adds a SparseVector type based on the existing SparseMatrixCSC type.

- Changes existing `SparseMatrixCSC{Tv,Ti}` to `SparseCSC{Tv,Ti,N}`
- exports `SparseMatrixCSC{Tv,Ti}` as `SparseCSC{Tv,Ti,2}`
- exports `SparseVector{Tv,Ti}` as `SparseCSC{Tv,Ti,1}`
- exports `SparseVecOrMat{Tv,Ti<:Integer}` as `Union(SparseMatrixCSC{Tv,Ti}, SparseVector{Tv,Ti})`

Also reinstated deprecated methods `spzeros(m::Integer)` and `spzeros(Tv::Type, m::Integer)` to create SparseVectors. It is probably inappropriate to reinstate them with a different behavior. Any other appropriate names?

Existing tests pass, but all operations on SparseVectors may not be implemented yet, and tests for vectors need to be added.