static public void sampleWithReplacement ( int [ ] sampleCounts , int samples , Random rand ) { Arrays . fill ( sampleCounts , 0 ) ; for ( int i = 0 ; i < samples ; i ++ ) sampleCounts [ rand . nextInt ( sampleCounts . length ) ] ++ ; }
Performs the sampling based on the number of data points storing the counts in an array to be constructed from XXXX