Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::random::independent_bits_engine< Engine, w, UIntType > Class Template Reference

An instantiation of class template independent_bits_engine model a . More...

#include <independent_bits.hpp>

Public Types

typedef Engine base_type
 
typedef UIntType result_type
 

Public Member Functions

 BOOST_STATIC_CONSTANT (bool, has_fixed_range=false)
 
 independent_bits_engine ()
 Constructs an independent_bits_engine using the default constructor of the base generator. More...
 
 BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR (independent_bits_engine, result_type, seed_arg)
 Constructs an independent_bits_engine, using seed as the constructor argument for both base generators. More...
 
 BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR (independent_bits_engine, SeedSeq, seq)
 Constructs an independent_bits_engine, using seq as the constructor argument for the base generator. More...
 
 independent_bits_engine (const base_type &base_arg)
 Constructs an independent_bits_engine by copying base. More...
 
template<class It >
 independent_bits_engine (It &first, It last)
 Contructs an independent_bits_engine with values from the range defined by the input iterators first and last. More...
 
void seed ()
 Seeds an independent_bits_engine using the default seed of the base generator. More...
 
 BOOST_RANDOM_DETAIL_ARITHMETIC_SEED (independent_bits_engine, result_type, seed_arg)
 Seeds an independent_bits_engine, using seed as the seed for the base generator. More...
 
 BOOST_RANDOM_DETAIL_SEED_SEQ_SEED (independent_bits_engine, SeedSeq, seq)
 Seeds an independent_bits_engine, using seq to seed the base generator. More...
 
template<class It >
void seed (It &first, It last)
 Seeds an independent_bits_engine with values from the range defined by the input iterators first and last. More...
 
result_type operator() ()
 Returns the next value of the generator. More...
 
template<class Iter >
void generate (Iter first, Iter last)
 Fills a range with random values. More...
 
void discard (boost::uintmax_t z)
 Advances the state of the generator by z. More...
 
const base_typebase () const
 
 BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR (os, independent_bits_engine, r)
 Writes the textual representation if the generator to a std::ostream. More...
 
 BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR (is, independent_bits_engine, r)
 Reads the state of an independent_bits_engine from a std::istream. More...
 
 BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR (independent_bits_engine, x, y)
 Returns: true iff the two independent_bits_engines will produce the same sequence of values. More...
 

Static Public Member Functions

static result_type min BOOST_PREVENT_MACRO_SUBSTITUTION ()
 Returns the smallest value that the generator can produce. More...
 
static result_type max BOOST_PREVENT_MACRO_SUBSTITUTION ()
 Returns the largest value that the generator can produce. More...
 

Detailed Description

template<class Engine, std::size_t w, class UIntType>
class boost::random::independent_bits_engine< Engine, w, UIntType >

An instantiation of class template independent_bits_engine model a .

It generates random numbers distributed between [0, 2^w) by combining one or more invocations of the base engine.

Requires: 0 < w <= std::numeric_limits<UIntType>::digits

Member Typedef Documentation

template<class Engine , std::size_t w, class UIntType >
typedef Engine boost::random::independent_bits_engine< Engine, w, UIntType >::base_type
template<class Engine , std::size_t w, class UIntType >
typedef UIntType boost::random::independent_bits_engine< Engine, w, UIntType >::result_type

Constructor & Destructor Documentation

template<class Engine , std::size_t w, class UIntType >
boost::random::independent_bits_engine< Engine, w, UIntType >::independent_bits_engine ( )
inline

Constructs an independent_bits_engine using the default constructor of the base generator.

template<class Engine , std::size_t w, class UIntType >
boost::random::independent_bits_engine< Engine, w, UIntType >::independent_bits_engine ( const base_type base_arg)
inline

Constructs an independent_bits_engine by copying base.

template<class Engine , std::size_t w, class UIntType >
template<class It >
boost::random::independent_bits_engine< Engine, w, UIntType >::independent_bits_engine ( It &  first,
It  last 
)
inline

Contructs an independent_bits_engine with values from the range defined by the input iterators first and last.

first will be modified to point to the element after the last one used.

Throws: std::invalid_argument if the input range is too small.

Exception Safety: Basic

Member Function Documentation

template<class Engine , std::size_t w, class UIntType >
const base_type& boost::random::independent_bits_engine< Engine, w, UIntType >::base ( ) const
inline
template<class Engine , std::size_t w, class UIntType >
static result_type min boost::random::independent_bits_engine< Engine, w, UIntType >::BOOST_PREVENT_MACRO_SUBSTITUTION ( )
inlinestatic

Returns the smallest value that the generator can produce.

template<class Engine , std::size_t w, class UIntType >
static result_type max boost::random::independent_bits_engine< Engine, w, UIntType >::BOOST_PREVENT_MACRO_SUBSTITUTION ( )
inlinestatic

Returns the largest value that the generator can produce.

template<class Engine , std::size_t w, class UIntType >
boost::random::independent_bits_engine< Engine, w, UIntType >::BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR ( independent_bits_engine< Engine, w, UIntType >  ,
result_type  ,
seed_arg   
)
inline

Constructs an independent_bits_engine, using seed as the constructor argument for both base generators.

template<class Engine , std::size_t w, class UIntType >
boost::random::independent_bits_engine< Engine, w, UIntType >::BOOST_RANDOM_DETAIL_ARITHMETIC_SEED ( independent_bits_engine< Engine, w, UIntType >  ,
result_type  ,
seed_arg   
)
inline

Seeds an independent_bits_engine, using seed as the seed for the base generator.

template<class Engine , std::size_t w, class UIntType >
boost::random::independent_bits_engine< Engine, w, UIntType >::BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR ( independent_bits_engine< Engine, w, UIntType >  ,
,
 
)
inline

Returns: true iff the two independent_bits_engines will produce the same sequence of values.

References boost::flyweights::x, and boost::polygon::y().

template<class Engine , std::size_t w, class UIntType >
boost::random::independent_bits_engine< Engine, w, UIntType >::BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR ( is  ,
independent_bits_engine< Engine, w, UIntType >  ,
 
)
inline

Reads the state of an independent_bits_engine from a std::istream.

template<class Engine , std::size_t w, class UIntType >
boost::random::independent_bits_engine< Engine, w, UIntType >::BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR ( os  ,
independent_bits_engine< Engine, w, UIntType >  ,
 
)
inline

Writes the textual representation if the generator to a std::ostream.

The textual representation of the engine is the textual representation of the base engine.

template<class Engine , std::size_t w, class UIntType >
boost::random::independent_bits_engine< Engine, w, UIntType >::BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR ( independent_bits_engine< Engine, w, UIntType >  ,
SeedSeq  ,
seq   
)
inline

Constructs an independent_bits_engine, using seq as the constructor argument for the base generator.

template<class Engine , std::size_t w, class UIntType >
boost::random::independent_bits_engine< Engine, w, UIntType >::BOOST_RANDOM_DETAIL_SEED_SEQ_SEED ( independent_bits_engine< Engine, w, UIntType >  ,
SeedSeq  ,
seq   
)
inline

Seeds an independent_bits_engine, using seq to seed the base generator.

template<class Engine , std::size_t w, class UIntType >
boost::random::independent_bits_engine< Engine, w, UIntType >::BOOST_STATIC_CONSTANT ( bool  ,
has_fixed_range  = false 
)
template<class Engine , std::size_t w, class UIntType >
void boost::random::independent_bits_engine< Engine, w, UIntType >::discard ( boost::uintmax_t  z)
inline

Advances the state of the generator by z.

References boost::multiprecision::backends::i.

template<class Engine , std::size_t w, class UIntType >
template<class Iter >
void boost::random::independent_bits_engine< Engine, w, UIntType >::generate ( Iter  first,
Iter  last 
)
inline

Fills a range with random values.

template<class Engine , std::size_t w, class UIntType >
result_type boost::random::independent_bits_engine< Engine, w, UIntType >::operator() ( )
inline
template<class Engine , std::size_t w, class UIntType >
void boost::random::independent_bits_engine< Engine, w, UIntType >::seed ( )
inline

Seeds an independent_bits_engine using the default seed of the base generator.

template<class Engine , std::size_t w, class UIntType >
template<class It >
void boost::random::independent_bits_engine< Engine, w, UIntType >::seed ( It &  first,
It  last 
)
inline

Seeds an independent_bits_engine with values from the range defined by the input iterators first and last.

first will be modified to point to the element after the last one used.

Throws: std::invalid_argument if the input range is too small.

Exception Safety: Basic


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