|
SSJ V. 1.2.5. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.randvar.RandomVariateGen
umontreal.iro.lecuyer.randvar.RandomVariateGenInt
public class RandomVariateGenInt
This is the base class for all generators of discrete random variates
over the set of integers.
Similar to RandomVariateGen
, except that the generators
produce integers, via the nextInt
method, instead of real numbers.
Constructor Summary | |
---|---|
RandomVariateGenInt(RandomStream s,
DiscreteDistributionInt dist)
Creates a new random variate generator for the discrete distribution dist, using stream s. |
Method Summary | |
---|---|
void |
nextArrayOfInt(int[] v,
int start,
int n)
Generates n random numbers from the discrete distribution contained in this object. |
int |
nextInt()
Generates a random number (an integer) from the discrete distribution contained in this object. |
Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen |
---|
getDistribution, getStream, nextArrayOfDouble, nextDouble, setStream |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RandomVariateGenInt(RandomStream s, DiscreteDistributionInt dist)
s
- random stream used for generating uniformsdist
- discrete distribution object of the generated valuesMethod Detail |
---|
public int nextInt()
public void nextArrayOfInt(int[] v, int start, int n)
nextInt()
n
times, but one can reimplement it in subclasses for better efficiency.
v
- array into which the variates will be storedstart
- starting index, in v, of the new variatesn
- number of variates being generated
|
SSJ V. 1.2.5. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |