Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As mentioned in the comments, <code>std::shuffle</code> takes a <em>random number generator</em> (or <em>engine</em> in standard speak), not a <em>random number distribution</em>. Different random number generators have different characteristics even if they have a theoretically uniform distribution.</p> <ul> <li><strong>Random</strong> or <strong>pseudo-random</strong> - True random number generators use some sort of an external entropy source. Pseudo-random generators (PRNGs) are strictly deterministic.</li> <li><strong>Performance</strong> - some generators are faster than others.</li> <li><strong>Memory usage</strong> - some PRNGs need more memory to store their state than others.</li> <li><strong>Period length</strong> - all PRNGs have a finite period after which they start repeating the same sequence from the beginning. Some have much longer periods than others.</li> <li><strong>Randomness quality</strong> - there are <a href="http://en.wikipedia.org/wiki/Randomness_test" rel="nofollow">numerous tests</a> for measuring whether there are subtle (or not-so-subtle!) patterns in a pseurorandom stream. See, for example, the <a href="http://en.wikipedia.org/wiki/Diehard_tests" rel="nofollow">Diehard tests</a>.</li> <li>Whether the stream is <strong><a href="http://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator" rel="nofollow">cryptographically secure</a></strong> or not. AFAIK, none of the standard PRNGs are.</li> </ul> <p>For an overview of the different generators offered by the standard, please refer to <a href="http://en.cppreference.com/w/cpp/numeric/random" rel="nofollow">http://en.cppreference.com/w/cpp/numeric/random</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload