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
(MRG). 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 random arrayp - the parameter of the underlying distribution
- Returns:
- a
n-dimensional random array
- Throws:
ClassCastException - if the object p could not be parsed to the
correct subclass
IllegalArgumentException - if an argument is not correct- See Also:
generate(double[], int, int, MRGParams)
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 random arrayp - the parameter of the underlying distribution
- Throws:
ClassCastException - if the object p could not be parsed to the
correct subclass
IllegalArgumentException - if an argument is not correct