de.jstacs.utils.random
Class UnivariateRandomGenerator
java.lang.Object
de.jstacs.utils.random.UnivariateRandomGenerator
public class UnivariateRandomGenerator
- extends Object
This class is a random generator for pseudo-random numbers.
- Author:
- Jens Keilwagen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnivariateRandomGenerator
public UnivariateRandomGenerator()
equalDistributed
public static double equalDistributed()
- Returns:
- an equal distributed double in [0,1] (p(x) = 1)
exponentialDistributed
public static double exponentialDistributed()
- Returns:
- an exponential distributed double [0,\infty] (p(x) = exp(-x))
erlangDistributed
public static double erlangDistributed(int alpha)
throws IOException
- gamma distributed for alpha \in N.
- Parameters:
alpha
- hyperparameter alpha
- Returns:
- a gamma distributed double [0,\infty]
- Throws:
IOException
erlangDistributed
public static double erlangDistributed(int alpha,
Random r)