std::piecew...distribution(3)
π NAME π
okay so bestie, welcome to std::piecew...distribution(3) from the C++ Standard Libary β yes, thatβs the manual name folded in near the top instead of copying the header line π
. The actual NAME section is literally:
std::piecewise_linear_distribution::piecewise_linear_distribution β std::piecewise_linear_distribution::piecewise_linear_distribution
No cap, thatβs the whole name, and itβs giving βsay it twice because itβs iconicβ β¨
β¨ Synopsis β¨
Hereβs the constructor lineup, all (since C++11) β main character energy only π«Ά
piecewise_linear_distribution();
(1) (since C++11)
template< class InputIt1, class InputIt2 >
piecewise_linear_distribution( InputIt1 first_i, InputIt1 last_i,
InputIt2 first_w );
(2) (since C++11)
template< class UnaryOperation >
piecewise_linear_distribution( std::initializer_list<RealType> ilist,
UnaryOperation fw );
(3) (since C++11)
template< class UnaryOperation >
piecewise_linear_distribution( std::size_t nw,
RealType xmin, RealType xmax,
UnaryOperation fw );
(4) (since C++11)
explicit piecewise_linear_distribution( const param_type& parm );
(5) (since C++11)
Constructs new piecewise linear distribution object. π Thatβs the description, and hereβs the numbered tea, fr fr:
- 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
ilistand the weights generated by the functionfw. - Constructs a distribution object with the
fwintervals distributed uniformly over[xmin, xmax]. - Constructs a distribution object initialized with the parameters
param.
πΈ Parameters πΈ
first_iβ iterator initialized to the start of the interval sequencelast_iβ iterator initialized to one-past-the-end of the interval sequencefirst_wβ iterator initialized to the start of the density (weight) sequenceilistβinitializer_listyielding the interval sequencefwβdouble(double)function yielding the densitiesnwβ the number of densitiesxminβ the lower bound of the interval sequencexmaxβ the upper bound of the interval sequenceparmβ the distribution parameter set
bestie, thatβs the whole vibe check π source/version and date at the very end: http://cppreference.com, 2024.06.10, and the manual name std::piecew...distribution(3). 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