stl:algorithm:random_shuffle

C++ Reference

random_shuffle

Syntax:

    #include <algorithm>
    void random_shuffle( iterator start, iterator end );
    void random_shuffle( iterator start, iterator end, RandomNumberGenerator& rnd );

The random_shuffle() function randomly re-orders the elements in the range [start,end). If a random number generator function object rnd is supplied, it will be used instead of an internal random number generator.

Related Topics: next_permutation, prev_permutation, random_sample, random_sample_n