The purpose of a sparse vector is to store non-zero entries for space-saving. Sparse vector has two parallel ways.
One vector is for indices
Another is for values
Example:
Vectors.sparse(4,Array(0,1,2,3),Array(2706d,40000d,300d,2.0,2.0,2003,86065)