生成一个指数分布。
template<class RealType = double>
class exponential_distribution {
public:
typedef RealType input_type;
typedef RealType result_type;
struct param_type;
explicit exponential_distribution(
result_type lambda0 = result_type(1.0));
explicit exponential_distribution(const param_type& par0);
result_type lambda() const;
param_type param() const;
void param(const param_type& par0);
result_type min() const;
result_type max() const;
void reset();
template<class Engine>
result_type operator()(Engine& eng);
template<class Engine>
result_type operator()(Engine& eng,
const param_type& par0);
private:
result_type stored_lambda; // exposition only
};
参数
- RealType
浮点引擎值类型。
备注
模板选件类描述导致一个用户指定的浮点类型的值与一个指数分布的分发。
要求
标头: <random>
命名空间: std
请参见
参考
exponential_distribution::exponential_distribution
exponential_distribution::lambda
exponential_distribution::operator()