26package umontreal.ssj.randvar;
28import umontreal.ssj.rng.RandomStream;
29import umontreal.ssj.probdist.DiscreteDistributionInt;
41public class RandomVariateGenInt
extends RandomVariateGen {
43 protected RandomVariateGenInt() {
82 throw new IllegalArgumentException(
"n must be positive.");
83 for (
int i = 0; i < n; i++)
98 throw new IllegalArgumentException(
"n must be positive.");
100 for (
int i = 0; i < n; i++)
Classes implementing discrete distributions over the integers should inherit from this class.
void nextArrayOfInt(int[] v, int start, int n)
Generates n random numbers from the discrete distribution contained in this object.
DiscreteDistributionInt getDistribution()
Returns the umontreal.ssj.probdist.DiscreteDistributionInt used by this generator.
int nextInt()
Generates a random number (an integer) from the discrete distribution contained in this object.
int[] nextArrayOfInt(int n)
Generates n random numbers from the discrete distribution contained in this object,...
RandomVariateGenInt(RandomStream s, DiscreteDistributionInt dist)
Creates a new random variate generator for the discrete distribution dist, using stream s.
This interface defines the basic structures to handle multiple streams of uniform (pseudo)random numb...