public double[] sample(int numSamples,Random rand){
  double[] samples=new double[numSamples];
  for (int i=0; i < samples.length; i++)   samples[i]=invCdf(rand.nextDouble());
  return samples;
}

public double [ ] sample ( int numSamples , Random rand ) { double [ ] samples = new double [ numSamples ] ; for ( int i = 0 ; i < samples . length ; i ++ ) samples [ i ] = invCdf ( rand . nextDouble ( ) ) ; return samples ; }
this method returns a double array containing the values of random samples from this distribution .
