Instantiations of subtract_with_carry_engine model a .
More...
#include <subtract_with_carry.hpp>
Public Types | |
| typedef IntType | result_type |
Public Member Functions | |
| BOOST_STATIC_CONSTANT (std::size_t, word_size=w) | |
| BOOST_STATIC_CONSTANT (std::size_t, long_lag=r) | |
| BOOST_STATIC_CONSTANT (std::size_t, short_lag=s) | |
| BOOST_STATIC_CONSTANT (uint32_t, default_seed=19780503u) | |
| BOOST_STATIC_CONSTANT (bool, has_fixed_range=false) | |
| BOOST_STATIC_CONSTANT (result_type, modulus=(result_type(1)<< w)) | |
| BOOST_STATIC_ASSERT (std::numeric_limits< result_type >::is_integer) | |
| subtract_with_carry_engine () | |
Constructs a new subtract_with_carry_engine and seeds it with the default seed. More... | |
| BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR (subtract_with_carry_engine, IntType, value) | |
Constructs a new subtract_with_carry_engine and seeds it with value. More... | |
| BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR (subtract_with_carry_engine, SeedSeq, seq) | |
Constructs a new subtract_with_carry_engine and seeds it with values produced by seq.generate(). More... | |
| template<class It > | |
| subtract_with_carry_engine (It &first, It last) | |
Constructs a new subtract_with_carry_engine and seeds it with values from a range. More... | |
| void | seed () |
| Seeds the generator with the default seed. More... | |
| BOOST_RANDOM_DETAIL_ARITHMETIC_SEED (subtract_with_carry_engine, IntType, value) | |
| BOOST_RANDOM_DETAIL_SEED_SEQ_SEED (subtract_with_carry, SeedSeq, seq) | |
Seeds the generator with values produced by seq.generate(). More... | |
| template<class It > | |
| void | seed (It &first, It last) |
| Seeds the generator with values from a range. More... | |
| result_type | operator() () |
| Returns the next value of the generator. More... | |
| void | discard (boost::uintmax_t z) |
Advances the state of the generator by z. More... | |
| template<class It > | |
| void | generate (It first, It last) |
| Fills a range with random values. More... | |
| BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR (os, subtract_with_carry_engine, f) | |
Writes a subtract_with_carry_engine to a std::ostream. More... | |
| BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR (is, subtract_with_carry_engine, f) | |
Reads a subtract_with_carry_engine from a std::istream. More... | |
| BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR (subtract_with_carry_engine, x, y) | |
| Returns true if the two generators will produce identical sequences 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... | |
Instantiations of subtract_with_carry_engine model a .
The algorithm is described in
"A New Class of Random Number Generators", George Marsaglia and Arif Zaman, Annals of Applied Probability, Volume 1, Number 3 (1991), 462-480.
| typedef IntType boost::random::subtract_with_carry_engine< IntType, w, s, r >::result_type |
|
inline |
Constructs a new subtract_with_carry_engine and seeds it with the default seed.
References boost::random::subtract_with_carry_engine< IntType, w, s, r >::seed().
|
inline |
Constructs a new subtract_with_carry_engine and seeds it with values from a range.
first is updated to point one past the last value consumed. If there are not enough elements in the range to fill the entire state of the generator, throws std::invalid_argument.
References boost::random::subtract_with_carry_engine< IntType, w, s, r >::seed().
|
inlinestatic |
Returns the smallest value that the generator can produce.
|
inlinestatic |
Returns the largest value that the generator can produce.
|
inline |
Constructs a new subtract_with_carry_engine and seeds it with value.
References boost::random::subtract_with_carry_engine< IntType, w, s, r >::seed(), and boost::program_options::value().
|
inline |
|
inline |
Returns true if the two generators will produce identical sequences of values.
References boost::polygon::y().
|
inline |
Reads a subtract_with_carry_engine from a std::istream.
|
inline |
Writes a subtract_with_carry_engine to a std::ostream.
|
inline |
Constructs a new subtract_with_carry_engine and seeds it with values produced by seq.generate().
References boost::random::subtract_with_carry_engine< IntType, w, s, r >::seed().
|
inline |
Seeds the generator with values produced by seq.generate().
| boost::random::subtract_with_carry_engine< IntType, w, s, r >::BOOST_STATIC_ASSERT | ( | std::numeric_limits< result_type >::is_integer | ) |
| boost::random::subtract_with_carry_engine< IntType, w, s, r >::BOOST_STATIC_CONSTANT | ( | std::size_t | , |
| word_size | = w |
||
| ) |
| boost::random::subtract_with_carry_engine< IntType, w, s, r >::BOOST_STATIC_CONSTANT | ( | std::size_t | , |
| long_lag | = r |
||
| ) |
| boost::random::subtract_with_carry_engine< IntType, w, s, r >::BOOST_STATIC_CONSTANT | ( | std::size_t | , |
| short_lag | = s |
||
| ) |
| boost::random::subtract_with_carry_engine< IntType, w, s, r >::BOOST_STATIC_CONSTANT | ( | uint32_t | , |
| default_seed | = 19780503u |
||
| ) |
| boost::random::subtract_with_carry_engine< IntType, w, s, r >::BOOST_STATIC_CONSTANT | ( | bool | , |
| has_fixed_range | = false |
||
| ) |
| boost::random::subtract_with_carry_engine< IntType, w, s, r >::BOOST_STATIC_CONSTANT | ( | result_type | , |
| modulus | = (result_type(1)<< w) |
||
| ) |
|
inline |
Advances the state of the generator by z.
References boost::random::detail::subtract_with_carry_discard::apply().
|
inline |
Fills a range with random values.
|
inline |
Returns the next value of the generator.
|
inline |
Seeds the generator with the default seed.
References boost::random::subtract_with_carry_engine< IntType, w, s, r >::seed().
Referenced by boost::random::subtract_with_carry_engine< IntType, w, s, r >::BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR(), boost::random::subtract_with_carry_engine< IntType, w, s, r >::BOOST_RANDOM_DETAIL_ARITHMETIC_SEED(), boost::random::subtract_with_carry_engine< IntType, w, s, r >::BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR(), boost::random::subtract_with_carry_engine< IntType, w, s, r >::seed(), and boost::random::subtract_with_carry_engine< IntType, w, s, r >::subtract_with_carry_engine().
|
inline |
Seeds the generator with values from a range.
Updates first to point one past the last consumed value. If the range does not contain enough elements to fill the entire state of the generator, throws std::invalid_argument.
References boost::xpressive::first, and boost::last.