![]() |
Home | Libraries | People | FAQ | More |
boost::random::triangle_distribution
// In header: <boost/random/triangle_distribution.hpp> template<typename RealType> class triangle_distribution { public: // types typedef ; typedef ; // member classes/structs/unions class param_type { public: // types typedef ; // construct/copy/destruct ( = , = , = ); // public member functions () ; () ; () ; // friend functions template<typename CharT, typename Traits> (, ); template<typename CharT, typename Traits> (, ); (, ); (, ); }; // construct/copy/destruct ( = , = , = ); (param_type &); // public member functions () ; () ; () ; () ; () ; param_type () ; (param_type &); (); template<typename Engine> (); template<typename Engine> (, param_type &); // friend functions template<typename CharT, typename Traits> (, ); template<typename CharT, typename Traits> (, ); (, ); (, ); };
Instantiations of triangle_distribution model a random distribution . A triangle_distribution has three parameters, a, b, and c, which are the smallest, the most probable and the largest values of the distribution respectively.
triangle_distribution
public
construct/copy/destruct( a = , b = , c = );
Constructs a with the parameters triangle_distributiona, b, and c.
Preconditions: a <= b <= c.
(param_type & param);
Constructs a from its parameters. triangle_distribution
triangle_distribution public member functions() ;
Returns the a parameter of the distribution
() ;
Returns the b parameter of the distribution
() ;
Returns the c parameter of the distribution
() ;
Returns the smallest value that the distribution can produce.
() ;
Returns the largest value that the distribution can produce.
param_type () ;
Returns the parameters of the distribution.
(param_type & param);
Sets the parameters of the distribution.
();
Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset.
template<typename Engine> ( eng);
Returns a random variate distributed according to the triangle distribution.
template<typename Engine> ( eng, param_type & param);
Returns a random variate distributed according to the triangle distribution with parameters specified by param.
triangle_distribution friend functionstemplate<typename CharT, typename Traits> ( os, td);
Writes the distribution to a std::ostream.
template<typename CharT, typename Traits> ( is, td);
Reads the distribution from a std::istream.
( lhs, rhs);
Returns true if the two distributions will produce identical sequences of values given equal generators.
( lhs, rhs);
Returns true if the two distributions may produce different sequences of values given equal generators.