de.jstacs.utils.random
Class DirichletMRG
java.lang.Object
de.jstacs.utils.random.MultivariateRandomGenerator
de.jstacs.utils.random.DirichletMRG
public class DirichletMRG
- extends MultivariateRandomGenerator
This class is a multivariate random generator based on a Dirichlet
distribution.
- Author:
- Jens Keilwagen
|
Field Summary |
static DirichletMRG |
DEFAULT_INSTANCE
This instance shall be used, since quite often two instance of this class
return the same values. |
|
Method Summary |
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. |
void |
generateLog(double[] d,
int start,
int n,
MRGParams p)
Fills a part of the array d beginning at start with n logarithmic values. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_INSTANCE
public static final DirichletMRG DEFAULT_INSTANCE
- This instance shall be used, since quite often two instance of this class
return the same values. With this a new Dirichlet random generator is
created.
generate
public void generate(double[] d,
int start,
int n,
MRGParams p)
- Description copied from class:
MultivariateRandomGenerator
- Generates a
n-dimensional random array as part of the array
d beginning at start.
- Specified by:
generate in class MultivariateRandomGenerator
- Parameters:
d - the arraystart - the start index for generated valuesn - the dimension of the random arrayp - the parameter of the underlying distribution
generateLog
public void generateLog(double[] d,
int start,
int n,
MRGParams p)
- Fills a part of the array
d beginning at start with n logarithmic values.
- 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- See Also:
DiMRGParams,
generate(double[], int, int, MRGParams)