std::discrete_distribution<IntType>::discrete_distribution
来自cppreference.com
                    
                                        
                    < cpp | numeric | random | 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 起) | 
构造新的分布对象。
1) 默认分布函数。构造拥有单个权重 p={1} 的分布。此分布始终生成 0 。
2) 构造拥有范围 [first, last) 中权重的分布。若 first == last ,则效果同默认构造函数。
3) 构造拥有 weights 中权重的分布。等效地调用 discrete_distribution(weights.begin(), weights.end()) 。
unary_op 生成的 count 个权重的分布。每个权重等于 wi = unary_op(xmin + δ/2 + i · δ) ,其中 δ =
| (xmax − xmin) | 
| count | 
xmin 与 xmax 必须使得 δ > 0 。若 count == 0 ,则效果同默认构造函数。
5) 以 params 为分布参数构造分布。
参数
| first, last | - |  定义用作权重的数的元素范围。 InputIterator 所指的元素类型必须可转换为 double
 | 
| weights | - | 含权重的 initializer_list | 
| unary_op | - |  将要应用的一元算符函数。 函数签名应等价于如下者: Ret fun(const Type &a); 签名不必有 const & 。  | 
| params | - | 分布参数集 | 
| 类型要求 | ||
 -InputIt 必须满足遗留输入迭代器 (LegacyInputIterator)  的要求。
 | ||