![]() |
Home | Libraries | People | FAQ | More |
boost::random::piecewise_linear_distribution::param_type
// In header: <boost/random/piecewise_linear_distribution.hpp> class param_type { public: // types typedef piecewise_linear_distribution ; // construct/copy/destruct (); template<typename IntervalIter, typename WeightIter> (, , ); template<typename T, typename F> (, ); template<typename IntervalRange, typename WeightRange> (, ); template<typename F> (, , , ); // friend functions template<typename CharT, typename Traits> (, param_type &); template<typename CharT, typename Traits> (, param_type &); (param_type &, param_type &); (param_type &, param_type &); // public member functions () ; () ; };
param_type
public
construct/copy/destruct();
Constructs a
object, representing a distribution that produces values uniformly distributed in the range [0, 1). param_type
template<typename IntervalIter, typename WeightIter> ( intervals_first, intervals_last, weight_first);
Constructs a
object from two iterator ranges containing the interval boundaries and weights at the boundaries. If there are fewer than two boundaries, then this is equivalent to the default constructor and the distribution will produce values uniformly distributed in the range [0, 1).param_type
The values of the interval boundaries must be strictly increasing, and the number of weights must be the same as the number of interval boundaries. If there are extra weights, they are ignored.
template<typename T, typename F> ( il, f);
Constructs a
object from an initializer_list containing the interval boundaries and a unary function specifying the weights at the boundaries. Each weight is determined by calling the function at the corresponding point.param_type
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).
template<typename IntervalRange, typename WeightRange> ( intervals_arg, weights_arg);
Constructs a
object from Boost.Range ranges holding the interval boundaries and the weights at the boundaries. 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. param_type
template<typename F> ( nw, xmin, xmax, f);
Constructs the parameters for a distribution that approximates a function. The range of the distribution is [xmin, xmax). This range is divided into nw equally sized intervals and the weights are found by calling the unary function f on the boundaries of the intervals.
param_type
friend functionstemplate<typename CharT, typename Traits> ( os, param_type & param);
Writes the parameters to a std::ostream
.
template<typename CharT, typename Traits> ( is, param_type & param);
Reads the parameters from a std::istream
.
(param_type & lhs, param_type & rhs);
Returns true if the two sets of parameters are the same.
(param_type & lhs, param_type & rhs);
Returns true if the two sets of parameters are different.