Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

gamma_distribution Class

Generates a gamma distribution.

template<class RealType = double>
    class gamma_distribution {
public:
    typedef T1 input_type;
    typedef RealType result_type;
    struct param_type;
    explicit gamma_distribution(result_type alpha0 = result_type(1.0),
        result_type beta0 = result_type(1.0));
    explicit gamma_distribution(const param_type& par0);
    result_type alpha() const;
    result_type beta() 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_alpha;    // exposition only
    result_type stored_beta;     // exposition only
    };

RealType

The floating-point engine value type.

The template class describes a distribution that produces values of a user-specified floating-point type with a gamma distribution.

Header: <random>

Namespace: std

Show:
© 2015 Microsoft