Pandora
Class MyRandom

public class MyRandom

This class can be used instead of Math.random() to generate random numbers.

Version:
0.1

Author:
Foudalis Ilias
Constructor Detail

MyRandom

public MyRandom()
Default class constructor. Generates an instance of MyRandom.

Method Detail

Random01

public double Random01()
The main function of the class, returns a random number in the range [0, 1).
Returns:
double

RandomPoisson

public double RandomPoisson(double L)
Returns a random double having the poisson distribution.
Parameters:
L - double : The "mean" L of the poisson distribution. Execution time grows with 'L', which must be <= 80
Returns:
double

getReverseSysTime

private double getReverseSysTime(double seed)
Reverses the system time.
Parameters:
seed - double Seed variable that is passed from Random01 and is the system time.
Returns:
double