javasparse-array

Which is the best way to implement a sparse vector in Java?


Which is the best way to implement a sparse vector in Java?

Of course the good thing would be to have something that can be manipulated quite easily (normalization, scalar product and so on)

Thanks in advance


Solution

  • MTJ has a Sparse Vector class. It has norm functions (1-norm 2-norm and ∞-norm) and dot product functions.