Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::random::uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > > Class Template Reference

#include <random.hpp>

Classes

class  param_type
 

Public Types

typedef
boost::multiprecision::number
< Backend, ExpressionTemplates > 
input_type
 
typedef
boost::multiprecision::number
< Backend, ExpressionTemplates > 
result_type
 

Public Member Functions

 uniform_smallint (result_type const &min_arg=0, result_type const &max_arg=9)
 Constructs a uniform_smallint. More...
 
 uniform_smallint (const param_type &parm)
 Constructs a uniform_smallint from its parameters. More...
 
result_type a () const
 Returns the minimum value of the distribution. More...
 
result_type b () const
 Returns the maximum value of the distribution. More...
 
result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const
 Returns the minimum value of the distribution. More...
 
result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const
 Returns the maximum value of the distribution. 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) const
 Returns a value uniformly distributed in the range [min(), max()]. More...
 
template<class Engine >
result_type operator() (Engine &eng, const param_type &parm) const
 Returns a value uniformly distributed in the range [param.a(), param.b()]. More...
 
 BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR (os, uniform_smallint, ud)
 Writes the distribution to a std::ostream. More...
 
 BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR (is, uniform_smallint, ud)
 Reads the distribution from a std::istream. More...
 
 BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR (uniform_smallint, lhs, rhs)
 Returns true if the two distributions will produce identical sequences of values given equal generators. More...
 

Member Typedef Documentation

template<class Backend , boost::multiprecision::expression_template_option ExpressionTemplates>
typedef boost::multiprecision::number<Backend, ExpressionTemplates> boost::random::uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > >::input_type
template<class Backend , boost::multiprecision::expression_template_option ExpressionTemplates>
typedef boost::multiprecision::number<Backend, ExpressionTemplates> boost::random::uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > >::result_type

Constructor & Destructor Documentation

template<class Backend , boost::multiprecision::expression_template_option ExpressionTemplates>
boost::random::uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > >::uniform_smallint ( result_type const &  min_arg = 0,
result_type const &  max_arg = 9 
)
inlineexplicit

Constructs a uniform_smallint.

min and max are the lower and upper bounds of the output range, respectively.

template<class Backend , boost::multiprecision::expression_template_option ExpressionTemplates>
boost::random::uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > >::uniform_smallint ( const param_type &  parm)
inlineexplicit

Constructs a uniform_smallint from its parameters.

Member Function Documentation

template<class Backend , boost::multiprecision::expression_template_option ExpressionTemplates>
result_type boost::random::uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > >::a ( ) const
inline

Returns the minimum value of the distribution.

template<class Backend , boost::multiprecision::expression_template_option ExpressionTemplates>
result_type boost::random::uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > >::b ( ) const
inline

Returns the maximum value of the distribution.

template<class Backend , boost::multiprecision::expression_template_option ExpressionTemplates>
result_type min boost::random::uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > >::BOOST_PREVENT_MACRO_SUBSTITUTION ( ) const
inline

Returns the minimum value of the distribution.

template<class Backend , boost::multiprecision::expression_template_option ExpressionTemplates>
result_type max boost::random::uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > >::BOOST_PREVENT_MACRO_SUBSTITUTION ( ) const
inline

Returns the maximum value of the distribution.

template<class Backend , boost::multiprecision::expression_template_option ExpressionTemplates>
boost::random::uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > >::BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR ( uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > >  ,
lhs  ,
rhs   
)
inline

Returns true if the two distributions will produce identical sequences of values given equal generators.

template<class Backend , boost::multiprecision::expression_template_option ExpressionTemplates>
boost::random::uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > >::BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR ( is  ,
uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > >  ,
ud   
)
inline

Reads the distribution from a std::istream.

template<class Backend , boost::multiprecision::expression_template_option ExpressionTemplates>
boost::random::uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > >::BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR ( os  ,
uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > >  ,
ud   
)
inline

Writes the distribution to a std::ostream.

template<class Backend , boost::multiprecision::expression_template_option ExpressionTemplates>
template<class Engine >
result_type boost::random::uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > >::operator() ( Engine &  eng) const
inline

Returns a value uniformly distributed in the range [min(), max()].

References boost::range::generate().

template<class Backend , boost::multiprecision::expression_template_option ExpressionTemplates>
template<class Engine >
result_type boost::random::uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > >::operator() ( Engine &  eng,
const param_type &  parm 
) const
inline

Returns a value uniformly distributed in the range [param.a(), param.b()].

template<class Backend , boost::multiprecision::expression_template_option ExpressionTemplates>
param_type boost::random::uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > >::param ( ) const
inline

Returns the parameters of the distribution.

template<class Backend , boost::multiprecision::expression_template_option ExpressionTemplates>
void boost::random::uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > >::param ( const param_type &  parm)
inline

Sets the parameters of the distribution.

template<class Backend , boost::multiprecision::expression_template_option ExpressionTemplates>
void boost::random::uniform_smallint< boost::multiprecision::number< Backend, ExpressionTemplates > >::reset ( void  )
inline

Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset.


The documentation for this class was generated from the following file: