binomial_distribution クラス
更新 : 2007 年 11 月
二項分布を生成します。
template<class IntType = int, class RealType = double>
class binomial_distribution {
public:
typedef /* implementation defined */ input_type;
typedef IntType result_type;
explicit binomial_distribution(result_type t0 = 1,
const RealType& p0 = RealType(0.5));
result_type t() const;
RealType p() const;
void reset();
template<class Engine>
result_type operator()(Engine& eng);
private:
const result_type stored_t; // exposition only
const RealType stored_p; // exposition only
};
パラメータ
IntType
結果を表す整数型。RealType
エンジンの値を表す浮動小数点型。
解説
このテンプレート クラスは、ユーザー指定の整数型の値を二項分布を使って生成する分布を表します。
必要条件
ヘッダー : <random>
名前空間 : std::tr1