26package umontreal.ssj.randvar;
28import umontreal.ssj.rng.*;
29import umontreal.ssj.probdist.BetaSymmetricalDist;
48 private double afactor;
63 throw new IllegalArgumentException(
" must have alpha > 1/2");
64 afactor = 2.0 / (2.0 * alpha - 1.0);
65 setParams(alpha, alpha, 0.0, 1.0);
88 double alp = dist.getAlpha();
90 throw new IllegalArgumentException(
" must have alpha > 1/2");
91 afactor = 2.0 / (2.0 * dist.getAlpha() - 1.0);
92 setParams(alp, alp, 0.0, 1.0);
116 return 0.5 + u * v / S * Math.sqrt(1.0 - Math.pow(S, 2.0 / (2.0 * alpha - 1.0)));
131 u = stream.nextDouble();
132 v = -1.0 + 2.0 * stream2.nextDouble();
135 return 0.5 + u * v / S * Math.sqrt(1.0 - Math.pow(S, afactor));
Specializes the class BetaDist to the case of a symmetrical beta distribution over the interval ,...
BetaSymmetricalGen(RandomStream s, double alpha)
Creates a new symmetrical beta generator with parameters.
BetaSymmetricalPolarGen(RandomStream s1, RandomStream s2, double alpha)
Creates a symmetrical beta random variate generator with parameter.
BetaSymmetricalPolarGen(RandomStream s1, double alpha)
Creates a symmetrical beta random variate generator with parameter.
static double nextDouble(RandomStream s, double alpha)
Generates a random number by Ulrich’s polar method using stream s.
RandomStream getStream2()
Returns stream s2 associated with this object.
BetaSymmetricalPolarGen(RandomStream s1, RandomStream s2, BetaSymmetricalDist dist)
Creates a new generator for the distribution dist, using stream s1 to generate and stream s2 to gene...
static double nextDouble(RandomStream s1, RandomStream s2, double alpha)
Generates a random number using Ulrich’s polar method.
BetaSymmetricalPolarGen(RandomStream s1, BetaSymmetricalDist dist)
Creates a new generator for the distribution dist, using only one stream s1.
double nextDouble()
Generates a random number from the continuous distribution contained in this object.
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,...