Instantiations of class template model a . More...
#include <lagged_fibonacci.hpp>
Public Types | |
typedef UIntType | 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 (UIntType, default_seed=331u) | |
lagged_fibonacci_engine () | |
Creates a new lagged_fibonacci_engine and calls seed() . More... | |
BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR (lagged_fibonacci_engine, UIntType, value) | |
Creates a new lagged_fibonacci_engine and calls seed(value) . More... | |
BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR (lagged_fibonacci_engine, SeedSeq, seq) | |
Creates a new lagged_fibonacci_engine and calls seed(seq) . More... | |
template<class It > | |
lagged_fibonacci_engine (It &first, It last) | |
Creates a new lagged_fibonacci_engine and calls seed(first, last) . More... | |
void | seed () |
Calls seed(default_seed) . More... | |
BOOST_RANDOM_DETAIL_ARITHMETIC_SEED (lagged_fibonacci_engine, UIntType, value) | |
Sets the state of the generator to values produced by a generator. More... | |
BOOST_RANDOM_DETAIL_SEED_SEQ_SEED (lagged_fibonacci_engine, SeedSeq, seq) | |
Sets the state of the generator using values produced by seq. More... | |
template<class It > | |
void | seed (It &first, It last) |
Sets the state of the generator to 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_engine, f) | |
Writes the textual representation of the generator to a std::ostream . More... | |
BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR (is, lagged_fibonacci_engine, f) | |
Reads the textual representation of the generator from a std::istream . More... | |
BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR (lagged_fibonacci_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 largest value that the generator can produce. More... | |
Instantiations of class template model a .
It uses a lagged Fibonacci algorithm with two lags p
and q:
x(i) = x(i-p) + x(i-q) (mod 2w) with p > q.
typedef UIntType boost::random::lagged_fibonacci_engine< UIntType, w, p, q >::result_type |
|
inline |
Creates a new lagged_fibonacci_engine
and calls seed()
.
References boost::random::lagged_fibonacci_engine< UIntType, w, p, q >::seed().
|
inline |
Creates a new lagged_fibonacci_engine
and calls seed(first, last)
.
References boost::random::lagged_fibonacci_engine< UIntType, w, p, q >::seed().
|
inlinestatic |
Returns the smallest value that the generator can produce.
|
inlinestatic |
Returns the largest value that the generator can produce.
|
inline |
Creates a new lagged_fibonacci_engine
and calls seed(value)
.
References boost::random::lagged_fibonacci_engine< UIntType, w, p, q >::seed(), and boost::program_options::value().
|
inline |
Sets the state of the generator to values produced by a generator.
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
.
|
inline |
Writes the textual representation of the generator to a std::ostream
.
|
inline |
Creates a new lagged_fibonacci_engine
and calls seed(seq)
.
References boost::random::lagged_fibonacci_engine< UIntType, w, p, q >::seed().
|
inline |
Sets the state of the generator using values produced by seq.
boost::random::lagged_fibonacci_engine< UIntType, w, p, q >::BOOST_STATIC_CONSTANT | ( | bool | , |
has_fixed_range | = false |
||
) |
boost::random::lagged_fibonacci_engine< UIntType, w, p, q >::BOOST_STATIC_CONSTANT | ( | int | , |
word_size | = w |
||
) |
boost::random::lagged_fibonacci_engine< UIntType, w, p, q >::BOOST_STATIC_CONSTANT | ( | unsigned | int, |
long_lag | = p |
||
) |
boost::random::lagged_fibonacci_engine< UIntType, w, p, q >::BOOST_STATIC_CONSTANT | ( | unsigned | int, |
short_lag | = q |
||
) |
boost::random::lagged_fibonacci_engine< UIntType, w, p, q >::BOOST_STATIC_CONSTANT | ( | UIntType | , |
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_engine< UIntType, w, p, q >::seed().
Referenced by boost::random::lagged_fibonacci_engine< UIntType, w, p, q >::BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR(), boost::random::lagged_fibonacci_01_engine< RealType, w, p, q >::BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR(), boost::random::lagged_fibonacci_engine< UIntType, w, p, q >::BOOST_RANDOM_DETAIL_ARITHMETIC_SEED(), boost::random::lagged_fibonacci_01_engine< RealType, w, p, q >::BOOST_RANDOM_DETAIL_ARITHMETIC_SEED(), boost::random::lagged_fibonacci_engine< UIntType, w, p, q >::BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR(), boost::random::lagged_fibonacci_01_engine< RealType, w, p, q >::BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR(), boost::random::lagged_fibonacci_01_engine< RealType, w, p, q >::lagged_fibonacci_01_engine(), boost::random::lagged_fibonacci_engine< UIntType, w, p, q >::lagged_fibonacci_engine(), and boost::random::lagged_fibonacci_engine< UIntType, w, p, q >::seed().
|
inline |
Sets the state of the generator to values from the iterator range [first, last).
If there are not enough elements in the range [first, last) throws std::invalid_argument
.
References boost::xpressive::first, and boost::last.