SSJ  3.3.1
Stochastic Simulation in Java
Public Member Functions | Static Public Member Functions | List of all members

This class implements random variate generators for the power distribution with shape parameter \(c > 0\), over the interval \([a,b]\). More...

Inheritance diagram for PowerGen:
[legend]
Collaboration diagram for PowerGen:
[legend]

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\), \(b =1\) and \(c =\) c, using stream s.
 
 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 RandomVariateGen
 RandomVariateGen (RandomStream s, Distribution dist)
 Creates a new random variate generator from the distribution dist, using stream s. More...
 
double nextDouble ()
 Generates a random number from the continuous distribution contained in this object. More...
 
void nextArrayOfDouble (double[] v, int start, int n)
 Generates n random numbers from the continuous distribution contained in this object. More...
 
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. More...
 
RandomStream getStream ()
 Returns the umontreal.ssj.rng.RandomStream used by this generator. More...
 
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. More...
 
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.
 

Additional Inherited Members

- Protected Attributes inherited from RandomVariateGen
RandomStream stream
 
Distribution dist
 

Detailed Description

This class implements random variate generators for the power distribution with shape parameter \(c > 0\), over the interval \([a,b]\).

Its density is

\[ f(x) = \frac{c(x-a)^{c - 1}}{(b - a)^c}, \tag{fpower} \]

for \(a \le x \le b\), and 0 elsewhere.


The documentation for this class was generated from the following file: