Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Click here to view the latest version of this page.
PrevUpHomeNext

Class seed_seq

boost::random::seed_seq

Synopsis

// 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);
};

Description

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/destruct

  1. seed_seq();

    Initializes a seed_seq to hold an empty sequence.

  2. template<typename T> seed_seq(const std::initializer_list< T > & il);

    Initializes the sequence from an initializer_list.

  3. template<typename Iter> seed_seq(Iter first, Iter last);

    Initializes the sequence from an iterator range.

  4. template<typename Range> explicit seed_seq(const Range & range);

    Initializes the sequence from Boost.Range range.

seed_seq public member functions

  1. template<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.

  2. std::size_t size() const;

    Returns the size of the sequence.

  3. template<typename Iter> void param(Iter out);

    Writes the stored sequence to iter.


PrevUpHomeNext