...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::random::linear_feedback_shift
// In header: <boost/random/linear_feedback_shift.hpp> template<typename UIntType, int w, int k, int q, int s, UIntType val> class linear_feedback_shift { public: // types typedef UIntType result_type; // construct/copy/destruct linear_feedback_shift(UIntType = 341); template<typename It> linear_feedback_shift(It &, It); // public member functions result_type min() const; result_type max() const; void seed(UIntType = 341); template<typename It> void seed(It &, It); result_type operator()(); // public static functions static bool validation(result_type); static const bool has_fixed_range; static const int word_size; static const int exponent1; static const int exponent2; static const int step_size; };
Instatiation 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.