de.jstacs.utils.random
Class MultivariateRandomGenerator
java.lang.Object
de.jstacs.utils.random.MultivariateRandomGenerator
- Direct Known Subclasses:
- DirichletMRG, EqualParts, ErlangMRG, SoftOneOfN
public abstract class MultivariateRandomGenerator
- extends Object
This class is the abstract super class for any multivariate random generator.
Some Random generators need parameters. These will be given by an object
MRGParams.
- Author:
- Jens Keilwagen
- See Also:
MRGParams
Method Summary |
abstract void |
generate(double[] d,
int start,
int n,
MRGParams p)
Generates a n-dimensional random-array as part of the array
d beginning at start . |
double[] |
generate(int n,
MRGParams p)
Generates a n-dimensional random-array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultivariateRandomGenerator
public MultivariateRandomGenerator()
generate
public double[] generate(int n,
MRGParams p)
throws ClassCastException,
IllegalArgumentException
- Generates a n-dimensional random-array.
- Parameters:
n
- the dimension of the arrayp
- the parameter of the distribution
- Returns:
- a n-dimensional random-array
- Throws:
ClassCastException
IllegalArgumentException
generate
public abstract void generate(double[] d,
int start,
int n,
MRGParams p)
throws ClassCastException,
IllegalArgumentException
- Generates a n-dimensional random-array as part of the array
d
beginning at start
.
- Parameters:
d
- the arraystart
- the start index for generated valuesn
- the dimension of the arrayp
- the parameter of the distribution
- Throws:
ClassCastException
IllegalArgumentException