![]() |
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 ; // construct/copy/destruct (); (); template<typename SeedSeq> (); template<typename It> (, ); // public static functions (); (); // public member functions (); (); 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
construct/copy/destruct();
Constructs a , using the default seed. linear_feedback_shift_engine
( s0);
Constructs a , seeding it with s0. linear_feedback_shift_engine
template<typename SeedSeq> ( seq);
Constructs a , seeding it with seq. linear_feedback_shift_engine
template<typename It> ( first, last);
Constructs a , seeding it with values from the range [first, last). linear_feedback_shift_engine
linear_feedback_shift_engine public member functions();
Seeds a with the default seed. linear_feedback_shift_engine
( s0);
Seeds a with linear_feedback_shift_engines0.
template<typename SeedSeq> ( seq);
Seeds a with values produced by linear_feedback_shift_engineseq.generate().
template<typename It> ( first, last);
Seeds a with values from the range [first, last). linear_feedback_shift_engine
();
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.