Namespaces
Variants

std::piecewise_linear_distribution<RealType>:: piecewise_linear_distribution

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

piecewise_linear_distribution ( InputIt1 first_i, InputIt1 last_i,

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

piecewise_linear_distribution ( std:: initializer_list < RealType > ilist,

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

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

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

构造新的分段线性分布对象。

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

参数

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