29 Numerics library [numerics]

29.6 Random number generation [rand]

29.6.8 Random number distribution class templates [rand.dist]

29.6.8.4 Poisson distributions [rand.dist.pois]

29.6.8.4.1 Class template poisson_­distribution [rand.dist.pois.poisson]

poisson_­distribution Случайное распределение числа производит целые значения i0 распределены по дискретной функции вероятности

P(i|μ)=eμμii!.

Параметр распределения μ также известен как это распределение . mean

template<class IntType = int>
  class poisson_distribution
  {
  public:
    // types
    using result_type = IntType;
    using param_type  = unspecified;

    // constructors and reset functions
    explicit poisson_distribution(double mean = 1.0);
    explicit poisson_distribution(const param_type& parm);
    void reset();

    // generating functions
    template<class URBG>
      result_type operator()(URBG& g);
    template<class URBG>
      result_type operator()(URBG& g, const param_type& parm);

    // property functions
    double mean() const;
    param_type param() const;
    void param(const param_type& parm);
    result_type min() const;
    result_type max() const;
  };

explicit poisson_distribution(double mean = 1.0);

Requires: 0<mean.

Effects: Строит poisson_­distribution объект; mean соответствует параметру распределения.

double mean() const;

Returns: Значение mean параметра, с которым был построен объект.