piecewise_constant_distribution(); | (1) | (since C++11) |
template< class InputIt1, class InputIt2 > piecewise_constant_distribution( InputIt1 first_i, InputIt1 last_i, InputIt2 first_w ); | (2) | (since C++11) |
template< class UnaryOperation > piecewise_constant_distribution( std::initializer_list<RealType> ilist_i, UnaryOperation fw ); | (3) | (since C++11) |
template< class UnaryOperation > piecewise_constant_distribution( std::size_t nw, RealType xmin, RealType xmax, UnaryOperation fw ); | (4) | (since C++11) |
explicit piecewise_constant_distribution( const param_type& param ); | (5) | (since C++11) |
Constructs new piecewise constant distribution object.
[
first_i
,
last_i
)
and a matching weight sequence starting at first_w
.ilist_i
and the weights generated by the function fw
.nw
intervals distributed uniformly over [xmin, xmax]
and the weights generated by the function fw
.param
.first_i | - | iterator initialized to the start of the interval sequence |
last_i | - | iterator initialized to one-past-the-end of the interval sequence |
first_w | - | iterator initialized to the start of the density (weight) sequence |
ilist_i | - | initializer_list yielding the interval sequence |
fw | - | double(double) function yielding the densities |
nw | - | the number of densities |
xmin | - | the lower bound of the interval sequence |
xmax | - | the upper bound of the interval sequence |
param | - | the distribution parameter set |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/numeric/random/piecewise_constant_distribution/piecewise_constant_distribution