This method returns a double array containing the values of random samples from this distribution. @param numSamples the number of random samples to take @param rand the source of randomness @return an array of the random sample values
(int numSamples, Random rand)
| 186 | * @return an array of the random sample values |
| 187 | */ |
| 188 | public double[] sample(int numSamples, Random rand) |
| 189 | { |
| 190 | double[] samples = new double[numSamples]; |
| 191 | for(int i = 0; i < samples.length; i++) |
| 192 | samples[i] = invCdf(rand.nextDouble()); |
| 193 | |
| 194 | return samples; |
| 195 | } |
| 196 | |
| 197 | /** |
| 198 | * This method returns a double array containing the values of random samples from this distribution. |
no test coverage detected