std::piecewise_constant_distribution<RealType>::piecewise_constant_distribution

 
 
数值库
常用数学函数
数学特殊函数 (C++17)
数学常数 (C++20)
浮点环境 (C++11)
复数
数值数组
伪随机数生成
编译时有理数算术 (C++11)
数值算法
(C++17)
(C++17)
插值
(C++20)
(C++20)
通用数值运算
(C++11)
位操作
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
 
 
 
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> bl,

                                 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& parm );
(5) (C++11 起)

构造新的 piecewise_constant_distribution 对象。

1) 构造 n = 1ρ0 = 1b0 = 0b1 = 1 的分布对象。
2) 从区间序列 [first_i, last_i) 上的迭代器和始于 first_w 的匹配权重序列构造分布对象。
3) 构造分布对象,其中区间取自 initializer_list bl 而权重以函数 fw 生成。
4) 构造分布对象,拥有 nw 个均匀分布的区间 [xmin, xmax] ,而权重以函数 fw 生成。
5) 构造以参数 param 初始化的分布对象。

参数

first_i - 初始化为指向区间序列起始的迭代器
last_i - 初始化为指向区间序列末尾尾后一位置的迭代器
first_w - 初始化为指向密度(权重)序列起始的迭代器
ilist_i - 产出区间序列的 initializer_list
fw - 产出密度的 double(double) 函数
nw - 密度数量
xmin - 区间序列下界
xmax - 区间序列上界
parm - 分布参数集