...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::seed_seq
// In header: <boost/random/seed_seq.hpp> class seed_seq { public: // types typedef boost::uint_least32_t result_type; // construct/copy/destruct seed_seq(); template<typename T> seed_seq(const std::initializer_list< T > &); template<typename Iter> seed_seq(Iter, Iter); template<typename Range> explicit seed_seq(const Range &); // public member functions template<typename Iter> void generate(Iter, Iter) const; std::size_t size() const; template<typename Iter> void param(Iter); };
The class seed_seq
stores a sequence of 32-bit words for seeding a pseudo-random number generator . These words will be combined to fill the entire state of the generator.
seed_seq
public
construct/copy/destructseed_seq();
Initializes a seed_seq
to hold an empty sequence.
template<typename T> seed_seq(const std::initializer_list< T > & il);
Initializes the sequence from an initializer_list.
template<typename Iter> seed_seq(Iter first, Iter last);
Initializes the sequence from an iterator range.
template<typename Range> explicit seed_seq(const Range & range);
Initializes the sequence from Boost.Range range.
seed_seq
public member functionstemplate<typename Iter> void generate(Iter first, Iter last) const;
Fills a range with 32-bit values based on the stored sequence.
Requires: Iter must be a Random Access Iterator whose value type is an unsigned integral type at least 32 bits wide.
std::size_t size() const;
Returns the size of the sequence.
template<typename Iter> void param(Iter out);
Writes the stored sequence to iter.