code: private static void copyFromSparseVector(DoubleVector destination,
                                               DoubleVector source) {
          int[] nonZeroIndices = ((SparseVector) source).getNonZeroIndices();
          for (int index : nonZeroIndices) 
              destination.set(index, source.get(index));
      }
docs: Copies values from a {@code SparseVector} into another vector
  
  @param destination The {@code Vector to copy values into.
  @param source The {@code @SparseVector} to copy values from.