다음을 통해 공유


bernoulli_distribution::param_type

분포의 매개 변수를 포함합니다.

struct param_type {     typedef bernoulli_distribution distribution_type;     param_type(double p = 0.5);     double p() const;     .....     bool operator==(const param_type& right) const;     bool operator!=(const param_type& right) const; };

매개 변수

상위 항목인 bernoulli_distribution 클래스를 참조하세요.

설명

사전 조건: 0.0 ≤ p ≤ 1.0

이 구조를 인스턴스화 시에는 분포의 클래스 생성자로, 기존 분포의 저장된 매개 변수를 설정하기 위해서는 param() 멤버 함수로, 저장된 매개 변수 대신 사용하기 위해서는 operator()로 전달할 수 있습니다.

요구 사항

헤더: <random>

네임스페이스: std

참고 항목

참조

<random>

bernoulli_distribution 클래스