Guest User

Untitled

a guest
May 27th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. private static double[] randomSample(double[] data, int sampleSize)
  2. {
  3. List sample = (ArrayList) Arrays.asList(data);
  4. Collections.shuffle(sample);
  5.  
  6. Double samplet[] = sample.toArray(new Double[sample.size()]);
  7.  
  8.  
  9. return samplet;
  10. }
Add Comment
Please, Sign In to add comment