This class implements random variate generators for the power distribution with shape parameter \(c > 0\), over the interval. More...
Public Member Functions | |
| PowerGen (RandomStream s, double a, double b, double c) | |
| Creates a Power random variate generator with parameters \(a =\) a, \(b
=\) b and \(c =\) c, using stream s. | |
| PowerGen (RandomStream s, double c) | |
| Creates a Power random variate generator with parameters \(a =0\),. | |
| PowerGen (RandomStream s, PowerDist dist) | |
| Creates a new generator for the power distribution dist and stream s. | |
| double | getA () |
| Returns the parameter \(a\). | |
| double | getB () |
| Returns the parameter \(b\). | |
| double | getC () |
| Returns the parameter \(c\). | |
| void | setParams (double a, double b, double c) |
| Sets the parameters \(a\), \(b\) and \(c\) for this object. | |
| Public Member Functions inherited from umontreal.ssj.randvar.RandomVariateGen | |
| RandomVariateGen (RandomStream s, Distribution dist) | |
| Creates a new random variate generator from the distribution dist, using stream s. | |
| double | nextDouble () |
| Generates a random number from the continuous distribution contained in this object. | |
| void | nextArrayOfDouble (double[] v, int start, int n) |
| Generates n random numbers from the continuous distribution contained in this object. | |
| double[] | nextArrayOfDouble (int n) |
| Generates n random numbers from the continuous distribution contained in this object, and returns them in a new array of size n. | |
| RandomStream | getStream () |
| Returns the umontreal.ssj.rng.RandomStream used by this generator. | |
| void | setStream (RandomStream stream) |
| Sets the umontreal.ssj.rng.RandomStream used by this generator to stream. | |
| Distribution | getDistribution () |
| Returns the umontreal.ssj.probdist.Distribution used by this generator. | |
| String | toString () |
| Returns a String containing information about the current generator. | |
Static Public Member Functions | |
| static double | nextDouble (RandomStream s, double a, double b, double c) |
| Uses inversion to generate a new variate from the power distribution with parameters \(a = \) a, \(b = \) b, and \(c =
\) c, using stream s. | |
This class implements random variate generators for the power distribution with shape parameter \(c > 0\), over the interval.
\[ f(x) = \frac{c(x-a)^{c - 1}}{(b - a)^c}, \tag{fpower} \]
for \(a \le x \le b\), and 0 elsewhere.
Definition at line 42 of file PowerGen.java.
| umontreal.ssj.randvar.PowerGen.PowerGen | ( | RandomStream | s, |
| double | a, | ||
| double | b, | ||
| double | c ) |
Creates a Power random variate generator with parameters \(a =\) a, \(b =\) b and \(c =\) c, using stream s.
Definition at line 51 of file PowerGen.java.
| umontreal.ssj.randvar.PowerGen.PowerGen | ( | RandomStream | s, |
| double | c ) |
Creates a Power random variate generator with parameters \(a =0\),.
\(b =1\) and \(c =\) c, using stream s.
Definition at line 61 of file PowerGen.java.
| umontreal.ssj.randvar.PowerGen.PowerGen | ( | RandomStream | s, |
| PowerDist | dist ) |
Creates a new generator for the power distribution dist and stream s.
Definition at line 69 of file PowerGen.java.
| double umontreal.ssj.randvar.PowerGen.getA | ( | ) |
Returns the parameter \(a\).
Definition at line 88 of file PowerGen.java.
| double umontreal.ssj.randvar.PowerGen.getB | ( | ) |
Returns the parameter \(b\).
Definition at line 95 of file PowerGen.java.
| double umontreal.ssj.randvar.PowerGen.getC | ( | ) |
Returns the parameter \(c\).
Definition at line 102 of file PowerGen.java.
|
static |
Uses inversion to generate a new variate from the power distribution with parameters \(a = \) a, \(b = \) b, and \(c = \) c, using stream s.
Definition at line 81 of file PowerGen.java.
| void umontreal.ssj.randvar.PowerGen.setParams | ( | double | a, |
| double | b, | ||
| double | c ) |
Sets the parameters \(a\), \(b\) and \(c\) for this object.
Definition at line 109 of file PowerGen.java.