WeibullRndGen Class Reference
[Random number generators]

Weibull random generator. More...

#include <rndgen.h>

List of all members.

Public Member Functions

 WeibullRndGen (double _location=1, double _scale=1, double _shape=1)
double get ()
 returns the random number


Detailed Description

Weibull random generator.

random generation of a double, following a Weibull distribution with PDF and CDF:

\[ p(x) = \frac{shape}{scale^{shape}} x^{shape-1} e^{-((x-location)/scale)^{shape}} \qquad \qquad \qquad P(x) = 1 - e^{-((x-location)/scale)^{shape}} \]

mean and variance of the Weibull distribution are:

\[ E[x] = location + scale \, \Gamma\left(\frac{shape+1}{shape}\right) \qquad \qquad \qquad \sigma^2 = scale^2 \, ( \Gamma\left(\frac{shape+2}{shape}\right) - \Gamma^2\left(\frac{shape+1}{shape}\right) ) \]


Constructor & Destructor Documentation

WeibullRndGen::WeibullRndGen double  _location = 1,
double  _scale = 1,
double  _shape = 1
[inline]
 

Parameters:
_location  location value of the Weibull distribution
_scale  scale value of the Weibull distribution
_shape  shape value of the Weibull distribution


The documentation for this class was generated from the following file:
Generated on Wed Dec 22 23:23:50 2004 for NePSing by doxygen 1.3.9.1 ---- Hosted by SourceForge.net Logo