RandomSingleton¶
-
public class
RandomSingleton¶ Creates only one instance of the random number generator that can be used throughout the whole model. Simulation results can then be reproduced by using the same seed.
Author: Milan Lovric
Methods¶
getInstance¶
-
public static RandomSingleton
getInstance()¶ Getter for the singleton instance of the random number generator.
Returns: Random number generator.
nextDouble¶
-
public double
nextDouble()¶ Generates a pseudorandom real number between 0 and 1.
Returns: Pseudorandom real double.