std::piecew...distribution(3)
π NAME π
std::piecewise_constant_distribution::piecewise_constant_distribution - std::piecewise_constant_distribution::piecewise_constant_distribution β okay bestie, yes, it's the same iconic name twice ππ. This is the std::piecew...distribution(3) page from the C++ Standard Libary, and it's literally all about the constructor for std::piecewise_constant_distribution.
β¨ Synopsis β¨
Deep breath, bestie β here's the whole constructor lineup, every one of them since C++11:
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 π . No cap, that's the whole mood. Here's the vibe check for each one:
- Constructs a distribution object with
n = 1,Ο0 = 1,b0 = 0, andb1 = 1π±. - Constructs a distribution object from iterators over the interval sequence
[first_i, last_i)and a matching weight sequence starting atfirst_wπ«Ά. - Constructs a distribution object where the intervals are taken from the initializer list
ilist_iand the weights generated by the functionfwπΈ. - Constructs a distribution object with the
nwintervals distributed uniformly over[xmin, xmax]and the weights generated by the functionfwπ₯. - Constructs a distribution object initialized with the parameters
paramπ.
π Parameters π
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_listyielding 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 π
okay bestie, that's the whole page, and it ate π. source/version: http://cppreference.com π, date: 2024.06.10 π. periodt.
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms