new method to traverse all nonzeros in SparseMatrix of Eigen