uniform_int クラス

更新 : 2007 年 11 月

整数の一様分布を生成します。

template<class IntType = int>
    class uniform_int {
public:
    typedef IntType input_type;
    tpyedef IntType result_type;
    explicit uniform_int(result_type min0 = 0, result_type max0 = 9);
    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, result_type n);
private:
    result_type stored_min;    // exposition only
    result_type stored_max;    // exposition only
    };

パラメータ

  • IntType
    結果を表す整数型。

解説

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

必要条件

ヘッダー : <random>

名前空間 : std::tr1

参照

参照

<random>

uniform_int クラス

uniform_real クラス