public class MultinomialRvg extends java.lang.Object implements RandomVectorGenerator
rmultinom in package normix.| Constructor and Description |
|---|
MultinomialRvg(int size,
double[] prob)
Construct a multinomial random vector generator.
|
MultinomialRvg(int size,
double[] prob,
RandomLongGenerator rng)
Construct a multinomial random vector generator.
|
| Modifier and Type | Method and Description |
|---|---|
double[] |
nextVector()
Get the next random vector.
|
void |
seed(long... seeds)
Seed the random vector generator to produce repeatable sequences.
|
public MultinomialRvg(int size,
double[] prob,
RandomLongGenerator rng)
size - an integer, say N, specifying the total number of objects that are put into K boxes in a typical multinomial experimentprob - a numeric non-negative vector of length K, specifying the probability for the K boxesrng - a uniform random number generatorpublic MultinomialRvg(int size,
double[] prob)
size - an integer, say N, specifying the total number of objects that are put into K boxes in a typical multinomial experimentprob - a numeric non-negative vector of length K, specifying the probability for the K boxespublic void seed(long... seeds)
RandomVectorGeneratorseed in interface RandomVectorGeneratorseeds - the seedspublic double[] nextVector()
RandomVectorGeneratornextVector in interface RandomVectorGenerator