|
| piecewise_linear_distribution () |
| Creates a new piecewise_linear_distribution that produces values uniformly distributed in the range [0, 1). More...
|
|
template<class IntervalIter , class WeightIter > |
| piecewise_linear_distribution (IntervalIter first_interval, IntervalIter last_interval, WeightIter first_weight) |
| Constructs a piecewise_linear_distribution from two iterator ranges containing the interval boundaries and the weights at the boundaries. More...
|
|
template<class T , class F > |
| piecewise_linear_distribution (std::initializer_list< T > il, F f) |
| Constructs a piecewise_linear_distribution from an initializer_list containing the interval boundaries and a unary function specifying the weights. More...
|
|
template<class IntervalsRange , class WeightsRange > |
| piecewise_linear_distribution (const IntervalsRange &intervals_arg, const WeightsRange &weights_arg) |
| Constructs a piecewise_linear_distribution from Boost.Range ranges holding the interval boundaries and the weights. More...
|
|
template<class F > |
| piecewise_linear_distribution (std::size_t nw, RealType xmin, RealType xmax, F f) |
| Constructs a piecewise_linear_distribution that approximates a function. More...
|
|
| piecewise_linear_distribution (const param_type &parm) |
| Constructs a piecewise_linear_distribution from its parameters. More...
|
|
template<class URNG > |
RealType | operator() (URNG &urng) const |
| Returns a value distributed according to the parameters of the piecewise_linear_distribution. More...
|
|
template<class URNG > |
RealType | operator() (URNG &urng, const param_type &parm) const |
| Returns a value distributed according to the parameters specified by param. More...
|
|
result_type min | BOOST_PREVENT_MACRO_SUBSTITUTION () const |
| Returns the smallest value that the distribution can produce. More...
|
|
result_type max | BOOST_PREVENT_MACRO_SUBSTITUTION () const |
| Returns the largest value that the distribution can produce. More...
|
|
std::vector< RealType > | densities () const |
| Returns a vector containing the probability densities at the interval boundaries. More...
|
|
std::vector< RealType > | intervals () const |
| Returns a vector containing the interval boundaries. More...
|
|
param_type | param () const |
| Returns the parameters of the distribution. More...
|
|
void | param (const param_type &parm) |
| Sets the parameters of the distribution. More...
|
|
void | reset () |
| Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. More...
|
|
| BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR (os, piecewise_linear_distribution, pld) |
| Writes a distribution to a std::ostream . More...
|
|
| BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR (is, piecewise_linear_distribution, pld) |
| Reads a distribution from a std::istream . More...
|
|
| BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR (piecewise_linear_distribution, lhs, rhs) |
| Returns true if the two distributions will return the same sequence of values, when passed equal generators. More...
|
|
template<class RealType = double>
class boost::random::piecewise_linear_distribution< RealType >
The class piecewise_linear_distribution
models a .
template<class RealType = double>
template<class IntervalIter , class WeightIter >
Constructs a piecewise_linear_distribution from two iterator ranges containing the interval boundaries and the weights at the boundaries.
If there are fewer than two boundaries, then this is equivalent to the default constructor and creates a distribution that produces values uniformly distributed in the range [0, 1).
The values of the interval boundaries must be strictly increasing, and the number of weights must be equal to the number of interval boundaries. If there are extra weights, they are ignored.
For example,
double intervals[] = { 0.0, 1.0, 2.0 };
double weights[] = { 0.0, 1.0, 0.0 };
piecewise_constant_distribution<> dist(
&intervals[0], &intervals[0] + 3, &weights[0]);
produces a triangle distribution.
References boost::multiprecision::backends::i, and boost::unit_test::framework::init().
template<class RealType = double>
template<class T , class F >
Constructs a piecewise_linear_distribution from an initializer_list containing the interval boundaries and a unary function specifying the weights.
Each weight is determined by calling the function at the corresponding interval boundary.
If the initializer_list contains fewer than two elements, this is equivalent to the default constructor and the distribution will produce values uniformly distributed in the range [0, 1).
References boost::end, and boost::unit_test::framework::init().
template<class RealType = double>
template<class IntervalsRange , class WeightsRange >
Constructs a piecewise_linear_distribution from Boost.Range ranges holding the interval boundaries and the weights.
If there are fewer than two interval boundaries, this is equivalent to the default constructor and the distribution will produce values uniformly distributed in the range [0, 1). The number of weights must be equal to the number of interval boundaries.
References boost::unit_test::framework::init().