import cern.colt.matrix.*;
I have a huge square sparse matrix (say 30k*30k) and I need to get non-zero elements of a specific row (to do some complicated math in a nested loop). The method forEachNonZero(IntIntDoubleFunction function) is probably not good enough because it goes through every non-zero element of the matrix.
SparseDoubleMatrix2D has a method viewRow (inherited from DoubleMatrix2D) which returns DoubleMatrix1D. But this is still not good enough because with DoubleMatrix1D I have to go through every single elements in the row to find non-zero elements.