top | item 5481280

(no title)

wandermatt | 13 years ago

I didn't see sparse vector support. Assuming I didn't just overlook it, is it on the roadmap?

discuss

order

aklein|13 years ago

Depends what you mean by sparse vector support. Maybe what you're interested in is best served by Series:

  val s = Series(Vec(1,2,3), Index(0,5,10))
This gives you

  s: org.saddle.Series[Int, Int] = 
  [3 x 1]
  0  -> 1
  5  -> 2
  10 -> 3
Then, for instance,

  s(5,10)
  res0: org.saddle.Series[Int,Int] =
  [2 x 1]
  5  -> 2
  10 -> 3

MLnick|13 years ago

For me at least, sparse vector support means you can do elementwise operations (on the non-sparse elements) and in particular linear algebra like vector dot-products and matrix-vector multiply.