Instatiations of class template shuffle_order_engine
model a .
More...
#include <shuffle_order.hpp>
Public Types | |
typedef UniformRandomNumberGenerator | base_type |
typedef base_type::result_type | result_type |
Public Member Functions | |
BOOST_STATIC_CONSTANT (bool, has_fixed_range=false) | |
BOOST_STATIC_CONSTANT (std::size_t, buffer_size=k) | |
BOOST_STATIC_CONSTANT (std::size_t, table_size=k) | |
BOOST_STATIC_ASSERT (std::numeric_limits< result_type >::is_integer) | |
BOOST_STATIC_ASSERT (k > 0) | |
shuffle_order_engine () | |
Constructs a shuffle_order_engine by invoking the default constructor of the base generator. More... | |
BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR (shuffle_order_engine, result_type, s) | |
Constructs a shuffle_output_engine by invoking the one-argument constructor of the base generator with the parameter seed. More... | |
BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR (shuffle_order_engine, SeedSeq, seq) | |
shuffle_order_engine (const base_type &rng) | |
Constructs a shuffle_output_engine by using a copy of the provided generator. More... | |
shuffle_order_engine (base_type &&rng) | |
template<class It > | |
shuffle_order_engine (It &first, It last) | |
void | seed () |
BOOST_RANDOM_DETAIL_ARITHMETIC_SEED (shuffle_order_engine, result_type, seed_arg) | |
Invokes the one-argument seed method of the base generator with the parameter seed and re-initializes the internal buffer array. More... | |
BOOST_RANDOM_DETAIL_SEED_SEQ_SEED (shuffle_order_engine, SeedSeq, seq) | |
Invokes the one-argument seed method of the base generator with the parameter seq and re-initializes the internal buffer array. More... | |
template<class It > | |
void | seed (It &first, It last) |
const base_type & | base () const |
result_type | operator() () |
void | discard (boost::uintmax_t z) |
Advances the generator by z steps. More... | |
template<class Iter > | |
void | generate (Iter first, Iter last) |
Fills a range with pseudo-random values. More... | |
BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR (os, shuffle_order_engine, s) | |
Writes a shuffle_order_engine to a std::ostream . More... | |
BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR (is, shuffle_order_engine, s) | |
Reads a shuffle_order_engine from a std::istream . More... | |
BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR (shuffle_order_engine, x, y) | |
Returns true if the two generators will produce identical sequences. 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... | |
Instatiations of class template shuffle_order_engine
model a .
It mixes the output of some (usually ) to get better statistical properties. The algorithm is described in
"Improving a poor random number generator", Carter Bays and S.D. Durham, ACM Transactions on Mathematical Software, Vol 2, No. 1, March 1976, pp. 59-64. http://doi.acm.org/10.1145/355666.355670
The output of the base generator is buffered in an array of length k. Every output X(n) has a second role: It gives an index into the array where X(n+1) will be retrieved. Used array elements are replaced with fresh output from the base generator.
Template parameters are the base generator and the array length k, which should be around 100.
typedef UniformRandomNumberGenerator boost::random::shuffle_order_engine< UniformRandomNumberGenerator, k >::base_type |
typedef base_type::result_type boost::random::shuffle_order_engine< UniformRandomNumberGenerator, k >::result_type |
|
inline |
Constructs a shuffle_order_engine
by invoking the default constructor of the base generator.
Complexity: Exactly k+1 invocations of the base generator.
References boost::unit_test::framework::init().
|
inlineexplicit |
Constructs a shuffle_output_engine
by using a copy of the provided generator.
Precondition: The template argument UniformRandomNumberGenerator shall denote a CopyConstructible type.
Complexity: Exactly k+1 invocations of the base generator.
References boost::unit_test::framework::init().
|
inlineexplicit |
References boost::unit_test::framework::init().
|
inline |
References boost::unit_test::framework::init().
|
inline |
|
inlinestatic |
Returns the smallest value that the generator can produce.
References boost::accumulators::extract::min.
|
inlinestatic |
Returns the largest value that the generator can produce.
References boost::accumulators::extract::max.
|
inline |
Constructs a shuffle_output_engine
by invoking the one-argument constructor of the base generator with the parameter seed.
Complexity: Exactly k+1 invocations of the base generator.
References boost::unit_test::framework::init(), and boost::asio::s.
|
inline |
Invokes the one-argument seed method of the base generator with the parameter seed and re-initializes the internal buffer array.
Complexity: Exactly k+1 invocations of the base generator.
References boost::unit_test::framework::init().
|
inline |
Returns true if the two generators will produce identical sequences.
References boost::algorithm::detail::equal(), and boost::flyweights::x.
|
inline |
Reads a shuffle_order_engine
from a std::istream
.
References boost::multiprecision::backends::i, and boost::asio::s.
|
inline |
Writes a shuffle_order_engine
to a std::ostream
.
References boost::multiprecision::backends::i, and boost::asio::s.
|
inline |
References boost::unit_test::framework::init().
|
inline |
Invokes the one-argument seed method of the base generator with the parameter seq and re-initializes the internal buffer array.
Complexity: Exactly k+1 invocations of the base generator.
References boost::unit_test::framework::init().
boost::random::shuffle_order_engine< UniformRandomNumberGenerator, k >::BOOST_STATIC_ASSERT | ( | std::numeric_limits< result_type >::is_integer | ) |
boost::random::shuffle_order_engine< UniformRandomNumberGenerator, k >::BOOST_STATIC_ASSERT | ( | k | , |
0 | |||
) |
boost::random::shuffle_order_engine< UniformRandomNumberGenerator, k >::BOOST_STATIC_CONSTANT | ( | bool | , |
has_fixed_range | = false |
||
) |
boost::random::shuffle_order_engine< UniformRandomNumberGenerator, k >::BOOST_STATIC_CONSTANT | ( | std::size_t | , |
buffer_size | = k |
||
) |
boost::random::shuffle_order_engine< UniformRandomNumberGenerator, k >::BOOST_STATIC_CONSTANT | ( | std::size_t | , |
table_size | = k |
||
) |
|
inline |
Advances the generator by z steps.
|
inline |
Fills a range with pseudo-random values.
|
inline |
|
inline |
References boost::unit_test::framework::init().
|
inline |
References boost::unit_test::framework::init().