shuffle_order_engine Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at shuffle_order_engine Class.

Generates a random sequence by reordering the values returned from its base engine.

template <class Engine, size_t K>  
class shuffle_order_engine;  

Parameters

Engine
The base engine type.

K
Table size. Number of elements in the buffer (table). Precondition: 0 < K

shuffle_order_engine::shuffle_order_engineshuffle_order_engine::baseshuffle_order_engine::discard
shuffle_order_engine::operator()shuffle_order_engine::base_typeshuffle_order_engine::seed

For more information about engine members, see <random>.

This template class describes an engine adaptor that produces values by reordering the values returned by its base engine. Each constructor fills the internal table with K values returned by the base engine, and a random element is selected from the table when a value is requested.

Header: <random>

Namespace: std

<random>

Show: