On Tue, Jun 25, 2013 at 4:53 AM, Apurv Khare <[email protected]>wrote:

>           double[] d = new double[c.length];
>                         for (int i = 0; i < c.length; i++)
>                                 d[i] = Double.parseDouble(c[i]);
>                         Vector vec = new
> RandomAccessSparseVector(c.length);
>                         vec.assign(d);
>

As a picky point, this could be done better this way:

                        Vector vec = new RandomAccessSparseVector(c.length);
                        for (int i = 0; i < c.length; i++) {
                                vec.set(i, Double.parseDouble(c[i]));
                        }

No need for the double array.

Reply via email to