/** * Returns a random number from the distribution with the given parameters n * and p. * * @param n * the number of trials * @param p * the probability of success. * @throws IllegalArgumentException * if <tt>n*Math.min(p,1-p) <= 0.0</tt> */ public static int staticNextInt(int n, double p) { synchronized (shared) { return shared.nextInt(n, p); } }
/** * Returns a random number from the distribution with the given parameters n * and p. * * @param n * the number of trials * @param p * the probability of success. * @throws IllegalArgumentException * if <tt>n*Math.min(p,1-p) <= 0.0</tt> */ public static int staticNextInt(int n, double p) { synchronized (shared) { return shared.nextInt(n, p); } }