bernoulli_distribution Class
베르누이 분포를 생성합니다.
class bernoulli_distribution {
public:
typedef int input_type;
struct param_type;
typedef bool result_type;
explicit bernoulli_distribution(double p0 = 0.5);
explicit bernoulli_distribution(const param_type& par0);
double p() 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:
const double stored_p; // exposition only
};
설명
클래스 형식의 값을 생성 하는 분포 설명 bool, 반환 true 생성자에는 인수가 지정한 확률.
요구 사항
헤더: <random>
네임 스페이스: std
참고 항목
참조
bernoulli_distribution::bernoulli_distribution