Instantiations of class template lagged_fibonacci_01
model a .
More...
#include <lagged_fibonacci.hpp>
Public Types | |
typedef RealType | result_type |
Public Member Functions | |
BOOST_STATIC_CONSTANT (bool, has_fixed_range=false) | |
BOOST_STATIC_CONSTANT (int, word_size=w) | |
BOOST_STATIC_CONSTANT (unsigned int, long_lag=p) | |
BOOST_STATIC_CONSTANT (unsigned int, short_lag=q) | |
BOOST_STATIC_CONSTANT (boost::uint32_t, default_seed=331u) | |
lagged_fibonacci_01_engine () | |
Constructs a lagged_fibonacci_01 generator and calls seed() . More... | |
BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR (lagged_fibonacci_01_engine, uint32_t, value) | |
Constructs a lagged_fibonacci_01 generator and calls seed(value) . More... | |
BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR (lagged_fibonacci_01_engine, SeedSeq, seq) | |
Constructs a lagged_fibonacci_01 generator and calls seed(gen) . More... | |
template<class It > | |
lagged_fibonacci_01_engine (It &first, It last) | |
void | seed () |
Calls seed(default_seed). More... | |
BOOST_RANDOM_DETAIL_ARITHMETIC_SEED (lagged_fibonacci_01_engine, boost::uint32_t, value) | |
Constructs a generator with the constructor parameter value and calls seed with it. More... | |
BOOST_RANDOM_DETAIL_SEED_SEQ_SEED (lagged_fibonacci_01_engine, SeedSeq, seq) | |
Seeds this lagged_fibonacci_01_engine using values produced by seq.generate . More... | |
template<class It > | |
void | seed (It &first, It last) |
Seeds this lagged_fibonacci_01_engine using values from the iterator range [first, 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... | |
BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR (os, lagged_fibonacci_01_engine, f) | |
Writes the textual representation of the generator to a std::ostream . More... | |
BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR (is, lagged_fibonacci_01_engine, f) | |
Reads the textual representation of the generator from a std::istream . More... | |
BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR (lagged_fibonacci_01_engine, x_, y_) | |
Returns true if the two generators will produce identical sequences of outputs. 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 upper bound of the generators outputs. More... | |
Instantiations of class template lagged_fibonacci_01
model a .
It uses a lagged Fibonacci algorithm with two lags p
and q
, evaluated in floating-point arithmetic: x(i) = x(i-p) + x(i-q) (mod 1) with p > q. See
"Uniform random number generators for supercomputers", Richard Brent, Proc. of Fifth Australian Supercomputer Conference, Melbourne, Dec. 1992, pp. 704-706.
The quality of the generator crucially depends on the choice of the parameters. User code should employ one of the sensibly parameterized generators such as instead.
The generator requires considerable amounts of memory for the storage of its state array. For example, requires about 4856 bytes and requires about 350 KBytes.
typedef RealType boost::random::lagged_fibonacci_01_engine< RealType, w, p, q >::result_type |
|
inline |
Constructs a lagged_fibonacci_01
generator and calls seed()
.
References boost::random::lagged_fibonacci_engine< UIntType, w, p, q >::seed().
|
inline |
|
inlinestatic |
Returns the smallest value that the generator can produce.
|
inlinestatic |
Returns the upper bound of the generators outputs.
|
inline |
Constructs a lagged_fibonacci_01
generator and calls seed(value)
.
References boost::random::lagged_fibonacci_engine< UIntType, w, p, q >::seed(), and boost::program_options::value().
|
inline |
Constructs a generator with the constructor parameter value and calls seed with it.
Distinct seeds in the range [1, 2147483647) will produce generators with different states. Other seeds will be equivalent to some seed within this range. See for details.
References boost::random::lagged_fibonacci_engine< UIntType, w, p, q >::seed(), and boost::program_options::value().
|
inline |
Returns true if the two generators will produce identical sequences of outputs.
References boost::algorithm::detail::equal().
|
inline |
Reads the textual representation of the generator from a std::istream
.
References boost::program_options::value().
|
inline |
Writes the textual representation of the generator to a std::ostream
.
References pow().
|
inline |
Constructs a lagged_fibonacci_01
generator and calls seed(gen)
.
References boost::random::lagged_fibonacci_engine< UIntType, w, p, q >::seed().
|
inline |
Seeds this lagged_fibonacci_01_engine
using values produced by seq.generate
.
boost::random::lagged_fibonacci_01_engine< RealType, w, p, q >::BOOST_STATIC_CONSTANT | ( | bool | , |
has_fixed_range | = false |
||
) |
boost::random::lagged_fibonacci_01_engine< RealType, w, p, q >::BOOST_STATIC_CONSTANT | ( | int | , |
word_size | = w |
||
) |
boost::random::lagged_fibonacci_01_engine< RealType, w, p, q >::BOOST_STATIC_CONSTANT | ( | unsigned | int, |
long_lag | = p |
||
) |
boost::random::lagged_fibonacci_01_engine< RealType, w, p, q >::BOOST_STATIC_CONSTANT | ( | unsigned | int, |
short_lag | = q |
||
) |
boost::random::lagged_fibonacci_01_engine< RealType, w, p, q >::BOOST_STATIC_CONSTANT | ( | boost::uint32_t | , |
default_seed | = 331u |
||
) |
|
inline |
Advances the state of the generator by z
.
|
inline |
Fills a range with random values.
|
inline |
Returns the next value of the generator.
References std::fill().
|
inline |
Calls seed(default_seed).
References boost::random::lagged_fibonacci_01_engine< RealType, w, p, q >::seed().
Referenced by boost::random::lagged_fibonacci_01_engine< RealType, w, p, q >::seed().
|
inline |
Seeds this lagged_fibonacci_01_engine
using values from the iterator range [first, last).
If there are not enough elements in the range, throws std::invalid_argument
.
References boost::xpressive::first, and boost::last.