26package umontreal.ssj.randvar;
28import umontreal.ssj.rng.*;
29import umontreal.ssj.probdist.*;
90 final double c1 = 1.448242853;
91 final double c2 = 3.307147487;
92 final double c3 = 1.46754004;
93 final double d1 = 1.036467755;
94 final double d2 = 5.295844968;
95 final double d3 = 3.631288474;
96 final double hm = 0.483941449;
97 final double zm = 0.107981933;
98 final double hp = 4.132731354;
99 final double zp = 18.52161694;
100 final double phln = 0.4515827053;
101 final double hm1 = 0.516058551;
102 final double hp1 = 3.132731354;
103 final double hzm = 0.375959516;
104 final double hzmp = 0.591923442;
105 final double as = 0.8853395638;
106 final double bs = 0.2452635696;
107 final double cs = 0.2770276848;
108 final double b = 0.5029324303;
109 final double x0 = 0.4571828819;
110 final double ym = 0.187308492;
111 final double ss = 0.7270572718;
112 final double t = 0.03895759111;
124 X = (rn > 0) ? (1 + rn) : (-1 + rn);
129 z = (rn > 0) ? 2 - rn : -2 - rn;
130 if ((c1 - y) * (c3 + Math.abs(z)) < c2) {
135 if ((y + d1) * (d3 + x) < d2) {
138 }
else if (hzmp - y < Math.exp(-(z * z + phln) / 2)) {
141 }
else if (y + hzm < Math.exp(-(x + phln) / 2)) {
159 if ((y - as + x) * (cs + x) + bs < 0) {
162 }
else if (y < x + t)
163 if (rn * rn < 4 * (b - Math.log(x))) {
171 return mu + sigma * X;
Extends the class ContinuousDistribution for the normal distribution (e.g., tjoh95a (page 80)).
static double nextDouble(RandomStream s, double mu, double sigma)
Generates a variate from the normal distribution with parameters  mu and  sigma,...
NormalACRGen(RandomStream s, NormalDist dist)
Creates a random variate generator for the normal distribution dist and stream s.
double nextDouble()
Generates a random number from the continuous distribution contained in this object.
NormalACRGen(RandomStream s, double mu, double sigma)
Creates a normal random variate generator with mean mu and standard deviation sigma,...
NormalACRGen(RandomStream s)
Creates a standard normal random variate generator with mean 0 and standard deviation 1,...
void setParams(double mu, double sigma)
Sets the parameters and of this object.
NormalGen(RandomStream s, double mu, double sigma)
Creates a normal random variate generator with mean mu and standard deviation sigma,...
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,...