Namespaces
Variants

std::piecewise_constant_distribution<RealType>:: piecewise_constant_distribution

From cppreference.net
piecewise_constant_distribution ( ) ;
(1) (自 C++11 起)
template < class InputIt1, class InputIt2 >

piecewise_constant_distribution ( InputIt1 first_i, InputIt1 last_i,

InputIt2 first_w ) ;
(2) (自 C++11 起)
template < class UnaryOperation >

piecewise_constant_distribution ( std:: initializer_list < RealType > ilist_i,

UnaryOperation fw ) ;
(3) (自 C++11 起)
template < class UnaryOperation >

piecewise_constant_distribution ( std:: size_t nw,
RealType xmin, RealType xmax,

UnaryOperation fw ) ;
(4) (自 C++11 起)
explicit piecewise_constant_distribution ( const param_type & param ) ;
(5) (自 C++11 起)

构造新的分段常数分布对象。

1) 构造一个分布对象,其参数为 n = 1 ρ0 = 1 b0 = 0 b1 = 1
2) 通过区间序列迭代器 [ first_i , last_i ) 和起始于 first_w 的对应权重序列构造分布对象。
3) 构造一个分布对象,其区间取自初始化列表 ilist_i ,权重由函数 fw 生成。
4) 构造一个分布对象,其 nw 个区间在 [ xmin, xmax ] 范围内均匀分布,且权重由函数 fw 生成。
5) 构造一个使用参数 param 初始化的分布对象。

参数

first_i - 初始化为区间序列起始位置的迭代器
last_i - 初始化为区间序列结束位置后一位的迭代器
first_w - 初始化为密度(权重)序列起始位置的迭代器
ilist_i - 生成区间序列的初始化列表
fw - 生成密度的 double(double) 函数
nw - 密度数量
xmin - 区间序列的下界
xmax - 区间序列的上界
param - 分布参数集