Implements the Negative exponential distribution. More...
#include <shark/Rng/NegExponential.h>
Public Member Functions | |
NegExponential (RngType &rng, double mean=0) | |
double | operator() (double mean) |
Draws a random number from the negative exponential distribution with the mean defined in the argument. More... | |
double | mean () const |
Returns the mean of the negative exponential distribution. More... | |
void | mean (double newMean) |
Sets the mean of the negative exponential distribution. More... | |
double | p (double x) |
Implements the Negative exponential distribution.
It's propability distribution is defined as
\[ p(x) = e^{-\lambda x}\]
Instead of lambda, we define the exponential distribution using the mean
\[ \mu = 1.0/\lambda \]
Definition at line 51 of file NegExponential.h.
|
inline |
Definition at line 57 of file NegExponential.h.
|
inline |
Returns the mean of the negative exponential distribution.
Definition at line 73 of file NegExponential.h.
|
inline |
Sets the mean of the negative exponential distribution.
newMean | the new Mean value |
Definition at line 80 of file NegExponential.h.
|
inline |
Draws a random number from the negative exponential distribution with the mean defined in the argument.
mean | the mean of the distribution from which the number is drawn |
Definition at line 66 of file NegExponential.h.
|
inline |
Definition at line 85 of file NegExponential.h.
References lambda.