exponential distribution¶
- group turbo_random_exponential
Functions
-
template<typename RealType, typename URBG>
RealType exponential(URBG &&urbg, RealType lambda = 1)¶ turbo::exponential<T>(bitgen, lambda = 1) turbo::exponential produces a floating point number representing the distance (time) between two consecutive events in a point process of events occurring continuously and independently at a constant average rate.
Tmust be a floating point type, but may be inferred from the type oflambda. See https://en.wikipedia.org/wiki/Exponential_distribution.Example:
cpp turbo::BitGen bitgen; ... double call_length = turbo::exponential(bitgen, 7.0);
- Template Parameters:
RealType –
URBG –
- Parameters:
urbg –
lambda –
- Returns:
RealType
-
template<typename RealType = double>
class exponential_distribution¶ - #include <exponential_distribution.h>
turbo::exponential_distribution<T> generates a number conforming to an exponential distribution and is equivalent to the standard [rand.dist.pois.exp] distribution.
See https://en.wikipedia.org/wiki/Exponential_distribution. Example:
cpp turbo::BitGen bitgen; ... double call_length = turbo::exponential(bitgen, 7.0);
- Template Parameters:
RealType –
-
class param_type¶
-
template<typename RealType, typename URBG>