code: private static void scatter(SparseVector v, double[] z) {
          int[] index = v.getIndex();
          int used = v.getUsed();
          double[] data = v.getData();
          Arrays.fill(z, 0);
          for (int i = 0; i < used; ++i)
              z[index[i]] = data[i];
      }
docs: Copies the sparse vector into a dense array