std::piecewise_linear_distribution<RealType>::piecewise_linear_distribution
来自 cppreference.cn
piecewise_linear_distribution(); |
(1) | (since C++11) |
template< class InputIt1, class InputIt2 > piecewise_linear_distribution( InputIt1 first_i, InputIt1 last_i, |
(2) | (since C++11) |
template< class UnaryOperation > piecewise_linear_distribution( std::initializer_list<RealType> ilist, |
(3) | (since C++11) |
template< class UnaryOperation > piecewise_linear_distribution( std::size_t nw, |
(4) | (since C++11) |
explicit piecewise_linear_distribution( const param_type& parm ); |
(5) | (since 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 | - | initializer_list,产生区间序列 |
fw | - | double(double) 函数,产生密度 |
nw | - | 密度的数量 |
xmin | - | 区间序列的下界 |
xmax | - | 区间序列的上界 |
parm | - | 分布参数集 |