geometric_distribution クラス

更新 : 2007 年 11 月

幾何分布を生成します。

template<class IntType = int, class RealType = double>
    class geometric_distribution {
public:
    typedef RealType input_type;
    typedef IntType result_type;
    explicit geometric_distribution(const RealType& p0 = RealType(0.5));
    RealType p() const;
    void reset();
    template<class Engine>
        result_type operator()(Engine& eng);
private:
    RealType stored_p;          // exposition only
    };

パラメータ

  • IntType
    結果を表す整数型。

  • RealType
    エンジンの値を表す浮動小数点型。

解説

このテンプレート クラスは、ユーザー指定の整数型の値を幾何分布を使って生成する分布を表します。

必要条件

ヘッダー : <random>

名前空間 : std::tr1

参照

参照

<random>

bernoulli_distribution クラス

binomial_distribution クラス

exponential_distribution クラス

gamma_distribution クラス

normal_distribution クラス

poisson_distribution クラス

uniform_int クラス

uniform_real クラス