![]() |
Home | Libraries | People | FAQ | More |
boost::random::linear_feedback_shift_engine
// In header: <boost/random/linear_feedback_shift.hpp> template<typename UIntType, w, k, q, s> class linear_feedback_shift_engine { public: // types typedef ; // public static functions (); (); // public member functions (); (); template<typename SeedSeq> (); template<typename It> (, ); (); (); template<typename SeedSeq> (); template<typename It> (, ); (); template<typename Iter> (, ); (); // friend functions template<typename CharT, typename Traits> (, ); template<typename CharT, typename Traits> (, ); (, ); (, ); // public data members static has_fixed_range; static word_size; static exponent1; static exponent2; static step_size; static default_seed; };
Instatiations of linear_feedback_shift model a pseudo-random number generator . It was originally proposed in
"Random numbers generated by linear recurrence modulo two.", Tausworthe, R. C.(1965), Mathematics of Computation 19, 201-209.
linear_feedback_shift_engine public member functions();
Constructs a linear_feedback_shift_engine, using the default seed.
( s0);
Constructs a linear_feedback_shift_engine, seeding it with s0.
template<typename SeedSeq> ( seq);
Constructs a linear_feedback_shift_engine, seeding it with seq.
template<typename It> ( first, last);
Constructs a linear_feedback_shift_engine, seeding it with values from the range [first, last).
();
Seeds a linear_feedback_shift_engine with the default seed.
( s0);
Seeds a linear_feedback_shift_engine with s0.
template<typename SeedSeq> ( seq);
Seeds a linear_feedback_shift_engine with values produced by seq.generate().
template<typename It> ( first, last);
Seeds a linear_feedback_shift_engine with values from the range [first, last).
();
Returns the next value of the generator.
template<typename Iter> ( first, last);
Fills a range with random values
( z);
Advances the state of the generator by z.
linear_feedback_shift_engine friend functionstemplate<typename CharT, typename Traits> ( os, x);
Writes the textual representation of the generator to a std::ostream.
template<typename CharT, typename Traits> ( is, x);
Reads the textual representation of the generator from a std::istream.
( x, y);
Returns true if the two generators will produce identical sequences of outputs.
( lhs, rhs);
Returns true if the two generators will produce different sequences of outputs.