Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Constructor Summary
`UnivariateRandomGenerator()`

Method Summary
`static double` | `equalDistributed()`
`static double` | `erlangDistributed(int alpha)` gamma distributed for alpha \in N.
`static double` | `erlangDistributed(int alpha, Random r)`
`static double` | `exponentialDistributed()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### UnivariateRandomGenerator

    public UnivariateRandomGenerator()

Method Detail

### 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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD