std::piecewise_constant_distribution<RealType>::piecewise_constant_distribution
來自 cppreference.com
piecewise_constant_distribution(); |
(1) | (C++11 起) |
template< class InputIt1, class InputIt2 > piecewise_constant_distribution( InputIt1 first_i, InputIt1 last_i, |
(2) | (C++11 起) |
template< class UnaryOperation > piecewise_constant_distribution( std::initializer_list<RealType> ilist_i, |
(3) | (C++11 起) |
template< class UnaryOperation > piecewise_constant_distribution( std::size_t nw, |
(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 | - | 生成區間序列的 initializer_list |
fw | - | 生成密度的 double(double) 函式 |
nw | - | 密度的數量 |
xmin | - | 區間序列的下限 |
xmax | - | 區間序列的上限 |
param | - | 分佈引數集 |