25package umontreal.ssj.randvar;
27import umontreal.ssj.rng.*;
28import umontreal.ssj.probdist.*;
49public class BetaGen extends RandomVariateGen {
65 super(s,
new BetaDist(alpha, beta, a, b));
66 setParams(alpha, beta, a, b);
74 this(s, alpha, beta, 0.0, 1.0);
83 setParams(dist.getAlpha(), dist.getBeta(), dist.getA(), dist.getB());
124 protected void setParams(
double alpha,
double beta,
double aa,
double bb) {
126 throw new IllegalArgumentException(
"alpha <= 0");
128 throw new IllegalArgumentException(
"beta <= 0");
130 throw new IllegalArgumentException(
"a >= b");
Extends the class ContinuousDistribution for the beta distribution.
double inverseF(double u)
Returns the inverse distribution function .
double getB()
Returns the parameter of this object.
BetaGen(RandomStream s, double alpha, double beta, double a, double b)
Creates a new beta generator with parameters alpha and beta, over the interval.
BetaGen(RandomStream s, double alpha, double beta)
Creates a new beta generator with parameters alpha and beta, over the interval ,...
double getAlpha()
Returns the parameter of this object.
double getBeta()
Returns the parameter of this object.
double getA()
Returns the parameter of this object.
static double nextDouble(RandomStream s, double alpha, double beta, double a, double b)
Generates a variate from the beta distribution with parameters.
BetaGen(RandomStream s, BetaDist dist)
Creates a new generator for the distribution dist, using stream s.
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,...