Erlang distributed random variable.
More...
#include <shark/Rng/Erlang.h>
|
| | Erlang (RngType &rng, double mean=0, double variance=1) |
| | Default c'tor, associates the distribution with the supplied RNG. More...
|
| |
| double | operator() (double mean, double variance) |
| | Reinitializes the distribution for the supplied parameters and samples a new random number. Default values are omitted to distinguish the operator from the default one. More...
|
| |
| double | mean () const |
| | Accesses the mean of the distribution. More...
|
| |
| double | variance () const |
| | Accesses the variance of the distribution. More...
|
| |
| void | mean (double newMean) |
| | Adjusts the mean of the distribution. More...
|
| |
| void | variance (double newVariance) |
| | Adjusts the variance of the distribution. More...
|
| |
| double | p (double &x) const |
| | Calculates the probability of x. More...
|
| |
template<typename RngType = shark::DefaultRngType>
class shark::Erlang< RngType >
Erlang distributed random variable.
Definition at line 135 of file Erlang.h.
§ Erlang()
template<typename RngType = shark::DefaultRngType>
Default c'tor, associates the distribution with the supplied RNG.
- Parameters
-
| [in,out] | rng | The RNG to associate the distribution with. |
| [in] | mean | The parameter mean, default value 0. |
| [in] | variance | The parameter variance, default value 1. |
Definition at line 148 of file Erlang.h.
§ mean() [1/2]
template<typename RngType = shark::DefaultRngType>
Accesses the mean of the distribution.
Definition at line 173 of file Erlang.h.
§ mean() [2/2]
template<typename RngType = shark::DefaultRngType>
Adjusts the mean of the distribution.
Definition at line 189 of file Erlang.h.
§ operator()()
template<typename RngType = shark::DefaultRngType>
| double shark::Erlang< RngType >::operator() |
( |
double |
mean, |
|
|
double |
variance |
|
) |
| |
|
inline |
Reinitializes the distribution for the supplied parameters and samples a new random number. Default values are omitted to distinguish the operator from the default one.
- Parameters
-
| [in] | mean | The new mean. |
| [in] | variance | The new variance. |
Definition at line 164 of file Erlang.h.
§ p()
template<typename RngType = shark::DefaultRngType>
§ variance() [1/2]
template<typename RngType = shark::DefaultRngType>
Accesses the variance of the distribution.
Definition at line 181 of file Erlang.h.
§ variance() [2/2]
template<typename RngType = shark::DefaultRngType>
The documentation for this class was generated from the following file: