/** * Returns a random number from the distribution. */ public double nextDouble() { return nextDouble(this.freedom); }
/** * Constructs a StudentT distribution. Example: freedom=1.0. * * @param freedom * degrees of freedom. * @throws IllegalArgumentException * if <tt>freedom <= 0.0</tt>. */ public StudentT(double freedom, DoubleRandomEngine randomGenerator) { setRandomGenerator(randomGenerator); setState(freedom); }
protected static StudentT shared = new StudentT(1.0, makeDefaultGenerator());
/** * Sets the uniform random number generated shared by all <b>static</b> * methods. * * @param randomGenerator * the new uniform random number generator to be shared. */ private static void xstaticSetRandomGenerator(DoubleRandomEngine randomGenerator) { synchronized (shared) { shared.setRandomGenerator(randomGenerator); } } }
protected static StudentT shared = new StudentT(1.0, makeDefaultGenerator());
/** * Sets the uniform random number generated shared by all <b>static</b> * methods. * * @param randomGenerator * the new uniform random number generator to be shared. */ private static void xstaticSetRandomGenerator(DoubleRandomEngine randomGenerator) { synchronized (shared) { shared.setRandomGenerator(randomGenerator); } } }
/** * Constructs a StudentT distribution. Example: freedom=1.0. * * @param freedom * degrees of freedom. * @throws IllegalArgumentException * if <tt>freedom <= 0.0</tt>. */ public StudentT(double freedom, DoubleRandomEngine randomGenerator) { setRandomGenerator(randomGenerator); setState(freedom); }
/** * Returns a random number from the distribution. */ public double nextDouble() { return nextDouble(this.freedom); }
/** * Returns a random number from the distribution. * * @param freedom * degrees of freedom. * @throws IllegalArgumentException * if <tt>freedom <= 0.0</tt>. */ public static double staticNextDouble(double freedom) { synchronized (shared) { return shared.nextDouble(freedom); } }
/** * Returns a random number from the distribution. * * @param freedom * degrees of freedom. * @throws IllegalArgumentException * if <tt>freedom <= 0.0</tt>. */ public static double staticNextDouble(double freedom) { synchronized (shared) { return shared.nextDouble(freedom); } }