random_device クラス
更新 : 2007 年 11 月
外部デバイスからランダム シーケンスを生成します。
class random_device {
public:
typedef unsigned int result_type;
explicit random_device(const std::string& token = /* implementation defined */);
result_type min() const;
result_type max() const;
double entropy() const;
result_type operator()();
private:
random_device(const random_device&); // exposition only
void operator=(const random_device&); // exposition only
};
解説
このクラスは乱数のソースを表します。可能な限り、非確定的な外部デバイスが使用されます。
必要条件
ヘッダー : <random>
名前空間 : std::tr1