#include <boost/math/distributions/exponential.hpp>
template <class RealType = double, class Policy = policies::policy<> > class exponential_distribution; typedef exponential_distribution<> exponential; template <class RealType, class Policy> class exponential_distribution { public: typedef RealType value_type; typedef Policy policy_type; exponential_distribution(RealType lambda = 1); RealType lambda()const; }; The exponential distribution is a continuous probability distribution with PDF:
It is often used to model the time between independent events that happen at a constant average rate. The following graph shows how the distribution changes for different values of the rate parameter lambda:
Member Functionsexponential_distribution(RealType lambda = 1); Constructs an Exponential distribution with parameter lambda. Lambda is defined as the reciprocal of the scale parameter. Requires lambda > 0, otherwise calls domain_error. RealType lambda()const; Accessor function returns the lambda parameter of the distribution. Non-member AccessorsAll the usual non-member accessor functions that are generic to all distributions are supported: Cumulative Distribution Function, Probability Density Function, Quantile, Hazard Function, Cumulative Hazard Function, mean, median, mode, variance, standard deviation, skewness, kurtosis, kurtosis_excess, range and support. The domain of the random variable is [0, +∞]. Accuracy
The exponential distribution is implemented in terms of the standard
library functions ImplementationIn the following table λ is the parameter lambda of the distribution, x is the random variate, p is the probability and q = 1-p.
references(See also the reference documentation for the related Extreme Distributions.)
|