Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/numeric/random/seed seq"

From cppreference.com
< cpp‎ | numeric‎ | random
(+)
 
(+requirements)
Line 8: Line 8:
  
 
It provides a way to seed a large number of random number engines or to seed a generator that requires a lot of entropy, given a small seed or a poorly distributed initial seed sequence.
 
It provides a way to seed a large number of random number engines or to seed a generator that requires a lot of entropy, given a small seed or a poorly distributed initial seed sequence.
 +
 +
{{tt|std::seed_seq}} meets the requirements of {{concept|SeedSequence}}.
  
 
===Member types===
 
===Member types===

Revision as of 10:06, 17 March 2012

Template:cpp/numeric/random/uniform real distribution/sidebar

Defined in header <random>
class seed_seq;
(since C++11)

std::seed_seq consumes a sequence of integer-valued data and produces a requested number of unsigned integer values i, 0 ≤ i < 232, based on the consumed data. The produced values are distributed over the entire 32-bit range even if the consumed values are close.

It provides a way to seed a large number of random number engines or to seed a generator that requires a lot of entropy, given a small seed or a poorly distributed initial seed sequence.

std::seed_seq meets the requirements of Template:concept.

Member types

Template:tdcl list begin Template:tdcl list hitem Template:tdcl list item Template:tdcl list end

Member functions

constructs and seeds the std::seed_seq object
(public member function)
operator=
(deleted)
not copy-assignable
(public member function)
calculates the bias-eliminated, evenly distributed 32-bit values
(public member function)
obtains the number of 32-bit values stored in std::seed_seq
(public member function)
obtains the 32-bit values stored in std::seed_seq
(public member function)

Example

Template:example cpp