Instantiations of triangle_distribution
model a .
More...
#include <triangle_distribution.hpp>
Classes | |
class | param_type |
Public Types | |
typedef RealType | input_type |
typedef RealType | result_type |
Public Member Functions | |
triangle_distribution (RealType a_arg=RealType(0.0), RealType b_arg=RealType(0.5), RealType c_arg=RealType(1.0)) | |
Constructs a triangle_distribution with the parameters a , b , and c . More... | |
triangle_distribution (const param_type &parm) | |
Constructs a triangle_distribution from its parameters. More... | |
result_type | a () const |
Returns the a parameter of the distribution. More... | |
result_type | b () const |
Returns the b parameter of the distribution. More... | |
result_type | c () const |
Returns the c parameter of the distribution. More... | |
RealType min | BOOST_PREVENT_MACRO_SUBSTITUTION () const |
Returns the smallest value that the distribution can produce. More... | |
RealType max | BOOST_PREVENT_MACRO_SUBSTITUTION () const |
Returns the largest value that the distribution can produce. 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... | |
template<class Engine > | |
result_type | operator() (Engine &eng) |
Returns a random variate distributed according to the triangle distribution. More... | |
template<class Engine > | |
result_type | operator() (Engine &eng, const param_type &parm) |
Returns a random variate distributed according to the triangle distribution with parameters specified by param. More... | |
BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR (os, triangle_distribution, td) | |
Writes the distribution to a std::ostream . More... | |
BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR (is, triangle_distribution, td) | |
Reads the distribution from a std::istream . More... | |
BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR (triangle_distribution, lhs, rhs) | |
Returns true if the two distributions will produce identical sequences of values given equal generators. More... | |
Instantiations of triangle_distribution
model a .
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.
typedef RealType boost::random::triangle_distribution< RealType >::input_type |
typedef RealType boost::random::triangle_distribution< RealType >::result_type |
|
inlineexplicit |
Constructs a triangle_distribution
with the parameters a
, b
, and c
.
Preconditions: a <= b <= c.
References BOOST_ASSERT, and boost::unit_test::framework::init().
Referenced by boost::random::triangle_distribution< RealType >::operator()().
|
inlineexplicit |
Constructs a triangle_distribution
from its parameters.
References boost::unit_test::framework::init().
|
inline |
Returns the a
parameter of the distribution.
|
inline |
Returns the b
parameter of the distribution.
|
inline |
Returns the smallest value that the distribution can produce.
|
inline |
Returns the largest value that the distribution can produce.
|
inline |
Returns true if the two distributions will produce identical sequences of values given equal generators.
|
inline |
Reads the distribution from a std::istream
.
|
inline |
Writes the distribution to a std::ostream
.
|
inline |
Returns the c
parameter of the distribution.
|
inline |
Returns a random variate distributed according to the triangle distribution.
References boost::geometry::math::sqrt().
|
inline |
Returns a random variate distributed according to the triangle distribution with parameters specified by param.
References boost::random::triangle_distribution< RealType >::triangle_distribution().
|
inline |
Returns the parameters of the distribution.
References boost::random::triangle_distribution< RealType >::param_type::param_type().
|
inline |
Sets the parameters of the distribution.
References boost::random::triangle_distribution< RealType >::param_type::a(), boost::random::triangle_distribution< RealType >::param_type::b(), boost::random::triangle_distribution< RealType >::param_type::c(), and boost::unit_test::framework::init().
|
inline |
Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset.