Instantiations of class template model a . More...
#include <bernoulli_distribution.hpp>
Classes | |
| class | param_type | 
Public Types | |
| typedef int | input_type | 
| typedef bool | result_type | 
Public Member Functions | |
| bernoulli_distribution (const RealType &p_arg=RealType(0.5)) | |
| Constructs a  object.  More... | |
| bernoulli_distribution (const param_type &parm) | |
| Constructs  from its parameters.  More... | |
| RealType | p () const | 
| Returns: The "p" parameter of the distribution.  More... | |
| bool min | BOOST_PREVENT_MACRO_SUBSTITUTION () const | 
| Returns the smallest value that the distribution can produce.  More... | |
| bool 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 > | |
| bool | operator() (Engine &eng) const | 
| Returns: a random variate distributed according to the .  More... | |
| template<class Engine > | |
| bool | operator() (Engine &eng, const param_type &parm) const | 
| Returns: a random variate distributed according to the  with parameters specified by param.  More... | |
| BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR (os, bernoulli_distribution, bd) | |
Writes the parameters of the distribution to a std::ostream.  More... | |
| BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR (is, bernoulli_distribution, bd) | |
Reads the parameters of the distribution from a std::istream.  More... | |
| BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR (bernoulli_distribution, lhs, rhs) | |
| Returns true iff the two distributions will produce identical sequences of values given equal generators.  More... | |
Instantiations of class template model a .
Such a random distribution produces bool values distributed with probabilities P(true) = p and P(false) = 1-p. p is the parameter of the distribution.
| typedef int boost::random::bernoulli_distribution< RealType >::input_type | 
| typedef bool boost::random::bernoulli_distribution< RealType >::result_type | 
      
  | 
  inlineexplicit | 
Constructs a object.
p is the parameter of the distribution.
Requires: 0 <= p <= 1
References BOOST_ASSERT.
Referenced by boost::random::bernoulli_distribution< RealType >::operator()().
      
  | 
  inlineexplicit | 
Constructs from its parameters.
      
  | 
  inline | 
Returns the smallest value that the distribution can produce.
      
  | 
  inline | 
Returns the largest value that the distribution can produce.
      
  | 
  inline | 
Returns true iff the two distributions will produce identical sequences of values given equal generators.
      
  | 
  inline | 
Reads the parameters of the distribution from a std::istream. 
      
  | 
  inline | 
Writes the parameters of the distribution to a std::ostream. 
      
  | 
  inline | 
Returns: a random variate distributed according to the .
      
  | 
  inline | 
Returns: a random variate distributed according to the with parameters specified by param.
References boost::random::bernoulli_distribution< RealType >::bernoulli_distribution().
      
  | 
  inline | 
Returns: The "p" parameter of the distribution.
      
  | 
  inline | 
Returns the parameters of the distribution.
References boost::random::bernoulli_distribution< RealType >::param_type::param_type().
      
  | 
  inline | 
Sets the parameters of the distribution.
References boost::random::bernoulli_distribution< RealType >::param_type::p().
      
  | 
  inline | 
Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset.