cxxomfort
rel.20210622
Simple backports for C++ - http://ryan.gulix.cl/fossil.cgi/cxxomfort/
|
An adapter that caches and returns results from a generator in a random-ish order. . More...
An adapter that caches and returns results from a generator in a random-ish order. .
Given an Engine such as ranlux24_base
, the instantiation Foo : shuffle_order_engine<ranlux24_base,44>
creates an adaptor that acts as an Engine, except that it caches 44 values that are then returned randomly instead of in the order given by the generator. Each new invocation of ::operator()
replaces the value returned from the cache with a new value from the Engine .
C++11 defines a specific instantiation with the name knuth_b
.