25package umontreal.ssj.randvar;
27import umontreal.ssj.rng.*;
28import umontreal.ssj.probdist.*;
46 private boolean available =
false;
47 private double[] variates =
new double[2];
48 private static double[] staticVariates =
new double[2];
74 polar(stream, n, variates);
86 polar(s, n, staticVariates);
87 return staticVariates[0];
108 private static void polar(
RandomStream stream,
int n,
double[] variates) {
116 double temp = Math.sqrt(n * (Math.exp(-2. / n * Math.log(w)) - 1.) / w);
117 variates[0] = u * temp;
118 variates[1] = v * temp;
Extends the class ContinuousDistribution for the Student.
StudentGen(RandomStream s, int n)
Creates a Student random variate generator with degrees of freedom, using stream s.
StudentPolarGen(RandomStream s, int n)
Creates a Student random variate generator with degrees of freedom, using stream s.
StudentPolarGen(RandomStream s, StudentDist dist)
Creates a new generator for the Student distribution dist and stream s.
double nextDouble()
Generates a random number from the continuous distribution contained in this object.
static double nextDouble(RandomStream s, int n)
Generates a new variate from the Student distribution with  n degrees of freedom,...
This interface defines the basic structures to handle multiple streams of uniform (pseudo)random numb...
double nextDouble()
Returns a (pseudo)random number from the uniform distribution over the interval , using this stream,...