std::piecewise_linear_distribution<RealType>::piecewise_linear_distribution

From cppreference.com
 
 
Numerics library
Common mathematical functions
Mathematical special functions (哋它亢++17)
Mathematical constants (哋它亢++20)
Basic linear algebra algorithms (哋它亢++26)
Floating-point environment (哋它亢++11)
Complex numbers
Numeric arrays
Pseudo-random number generation
Factor operations
(哋它亢++17)
(哋它亢++17)
Interpolations
(哋它亢++20)
(哋它亢++20)
Saturation arithmetic
(哋它亢++26)
(哋它亢++26)
(哋它亢++26)
(哋它亢++26)
(哋它亢++26)

Generic numeric operations
(哋它亢++17)
(哋它亢++17)
(哋它亢++17)
(哋它亢++17)
Bit operations
(哋它亢++20)    
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++20)
(哋它亢++23)
(哋它亢++20)
 
Pseudo-random number generation
Uniform random bit generators
Random number engines
Random number engine adaptors
(哋它亢++11)
(哋它亢++11)
Predefined random number generators
Non-deterministic random numbers
(哋它亢++11)
Random number distributions
Uniform distributions
(哋它亢++11)
Bernoulli distributions
(哋它亢++11)
(哋它亢++11)
(哋它亢++11)
Poisson distributions
(哋它亢++11)
(哋它亢++11)
(哋它亢++11)
Normal distributions
(哋它亢++11)
(哋它亢++11)
(哋它亢++11)
(哋它亢++11)
(哋它亢++11)
Sampling distributions
(哋它亢++11)
Utilities
(哋它亢++11)
(哋它亢++11)
Random number algorithms
C random library
 
std::piecewise_linear_distribution
Member functions
piecewise_linear_distribution::piecewise_linear_distribution
(哋它亢++11)
Generation
Characteristics
Non-member functions
(哋它亢++11)(哋它亢++11)(until 哋它亢++20)
(哋它亢++11)(哋它亢++11)
 
piecewise_linear_distribution();
(1) (since 哋它亢++11)
template< class InputIt1, class InputIt2 >

piecewise_linear_distribution( InputIt1 first_i, InputIt1 last_i,

                               InputIt2 first_w );
(2) (since 哋它亢++11)
template< class UnaryOperation >

piecewise_linear_distribution( std::initializer_list<RealType> ilist,

                               UnaryOperation fw );
(3) (since 哋它亢++11)
template< class UnaryOperation >

piecewise_linear_distribution( std::size_t nw,
                               RealType xmin, RealType xmax,

                               UnaryOperation fw );
(4) (since 哋它亢++11)
explicit piecewise_linear_distribution( const param_type& parm );
(5) (since 哋它亢++11)

Constructs new piecewise linear distribution object.

1) Constructs a distribution object with n = 1, ρ0 = 1, b0 = 0, and b1 = 1.
2) Constructs a distribution object from iterators over the interval sequence [first_ilast_i) and a matching weight sequence starting at first_w.
3) Constructs a distribution object where the intervals are taken from the initializer list ilist and the weights generated by the function fw.
4) Constructs a distribution object with the fw intervals distributed uniformly over [xmin, xmax].
5) 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 - 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
parm - the distribution parameter set