Inheritance diagram for ExponentialRandom:

This class generates random numbers from an exponential distribution.
Definition at line 393 of file Random.H.
Public Member Functions | |
| ExponentialRandom (const double lambda=1.0, const unsigned long seed=1UL) | |
Generate samples | |
| double | number () |
| Generate a sample from the random variable. | |
Moments of the random variable | |
| double | mean () const |
| double | variance () const |
| double | stdDev () const |
Parameters of the random variable | |
| double | lambda () const |
Change parameters of the random variable | |
| void | setMean (const double mean) |
| void | setVariance (const double variance) |
| void | setStdDev (const double std_dev) |
| void | setLambda (const double lambda) |
| void | setParameters (const double mean, const double variance) |
Private Attributes | |
| double | m_lambda |
| ExponentialRandom | ( | const double | lambda = 1.0, |
|
| const unsigned long | seed = 1UL | |||
| ) | [inline] |
| double number | ( | ) | [virtual] |
Generate a sample from the random variable.
This function generates a sample from the random variable represented by the class instance.
Implements RealRandom.
| double mean | ( | ) | const [inline, virtual] |
Implements RealRandom.
Definition at line 410 of file Random.H.
References m_lambda.
| double variance | ( | ) | const [inline, virtual] |
Implements RealRandom.
Definition at line 411 of file Random.H.
References m_lambda.
| double stdDev | ( | ) | const [inline, virtual] |
Implements RealRandom.
Definition at line 412 of file Random.H.
References m_lambda.
| double lambda | ( | ) | const [inline] |
| void setMean | ( | const double | mean | ) | [inline] |
Set the mean of the random variable.
| mean | The new mean of the random variable. |
Definition at line 425 of file Random.H.
References m_lambda.
Referenced by setParameters().
| void setVariance | ( | const double | variance | ) | [inline] |
Set the variance of the random variable.
| variance | The new variance of the random variable. |
Definition at line 428 of file Random.H.
References m_lambda.
Referenced by setParameters().
| void setStdDev | ( | const double | std_dev | ) | [inline] |
| void setLambda | ( | const double | lambda | ) | [inline] |
| void setParameters | ( | const double | mean, | |
| const double | variance | |||
| ) | [inline] |
Set the mean and variance of the random variable.
| mean | The new mean of the random variable. | |
| variance | The new variance of the random variable. |
Definition at line 438 of file Random.H.
References setMean(), and setVariance().
double m_lambda [private] |
Definition at line 443 of file Random.H.
Referenced by lambda(), mean(), setLambda(), setMean(), setStdDev(), setVariance(), stdDev(), and variance().
1.5.1