public class RandomEx4 extends Object
Generates a pseudorandom sample from a discrete uniform distribution.
In this example, nextDiscrete
and
nextUniformDiscrete
are each used to generate discrete uniform
pseudorandom numbers. Note that the probabilities across the possible values
must be equal, in order to generate uniformly from nextDiscrete
.
Also note that since the same random seed is used, the methods produce the
same results.
Constructor and Description |
---|
RandomEx4() |
public static void main(String[] args)
Copyright © 2020 Rogue Wave Software. All rights reserved.