std::discrete_distribution<IntType>:: discrete_distribution
|
discrete_distribution
(
)
;
|
(1) | (C++11부터) |
|
template
<
class
InputIt
>
discrete_distribution ( InputIt first, InputIt last ) ; |
(2) | (C++11부터) |
|
discrete_distribution
(
std::
initializer_list
<
double
>
weights
)
;
|
(3) | (C++11부터) |
|
template
<
class
UnaryOperation
>
discrete_distribution
(
std::
size_t
count,
double
xmin,
double
xmax,
|
(4) | (C++11부터) |
|
explicit
discrete_distribution
(
const
param_type
&
params
)
;
|
(5) | (C++11부터) |
새로운 분포 객체를 생성합니다.
[
first
,
last
)
범위 내의 가중치로 분포를 구성합니다.
first
==
last
인 경우, 효과는 기본 생성자와 동일합니다.
| (xmax − xmin) |
| count |
매개변수
| first, last | - |
가중치로 사용할 숫자를 정의하는 요소들의 범위.
InputIterator
가 참조하는 요소들의 타입은
double
로 변환 가능해야 함
|
| weights | - | 가중치를 포함하는 초기화 리스트 |
| unary_op | - |
적용될 단항 연산 함수 객체
함수의 시그니처는 다음에 해당해야 함: Ret fun ( const Type & a ) ;
시그니처에
const
&
가 필요하지 않음
|
| params | - | 분포 매개변수 집합 |
| 타입 요구사항 | ||
-
InputIt
는
LegacyInputIterator
의 요구사항을 충족해야 함
|
||