HugeDoubleMatrix is dense matrix but here we need sparse matrix which would have different data structure (2 arrays, one for indices and on for values)