[#absl-Exponential] = xref:absl.adoc[absl]::Exponential :relfileprefix: ../ :mrdocs: Produces a floating point value from an exponential distribution. == Synopsis Declared in `<absl/random/distributions.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename RealType, typename URBG> RealType Exponential( URBG&& urbg, RealType lambda = 1); ---- == Description `absl::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 `lambda`. `T` must be a floating point type, but may be inferred from the type of `lambda`. The mean of the distribution is 1/`lambda`. See https://en.wikipedia.org/wiki/Exponential_distribution. Example: absl::BitGen bitgen; ... double call_length = absl::Exponential(bitgen, 7.0); == Return Value A random value drawn from the exponential distribution. == Parameters [cols="1,4"] |=== | Name| Description | *urbg* | The uniform random bit generator. | *lambda* | The constant average rate of events. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#