25package umontreal.ssj.randvar;
27import umontreal.ssj.rng.*;
28import umontreal.ssj.probdist.*;
76 setParams(dist.getA(), dist.getB(), dist.getM());
116 private void setParams(
double a,
double b,
double m) {
117 if ((a == 0.0 && b == 1.0) && (m < 0 || m > 1))
118 throw new IllegalArgumentException(
"m is not in [0,1]");
120 throw new IllegalArgumentException(
"a >= b");
121 else if (m < a || m > b)
122 throw new IllegalArgumentException(
"m is not in [a,b]");
Extends the class ContinuousDistribution for the triangular distribution (see tjoh95b (page 297) and...
double inverseF(double u)
Returns the inverse distribution function .
double getM()
Returns the value of for this object.
TriangularGen(RandomStream s, double a, double b, double m)
Creates a triangular random variate generator over the interval (a, b), with parameter m,...
TriangularGen(RandomStream s, TriangularDist dist)
Creates a new generator for the triangular distribution dist and stream s.
TriangularGen(RandomStream s, double m)
Creates a triangular random variate generator over the interval , with parameter m,...
double getA()
Returns the value of for this object.
double getB()
Returns the value of for this object.
static double nextDouble(RandomStream s, double a, double b, double m)
Generates a new variate from the triangular distribution with parameters  a,  b and  m and stre...
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,...