![]() |
OpenMS
|
Portable random shuffle with a reproducible, platform-independent random sequence. More...
#include <OpenMS/MATH/MathFunctions.h>
Public Member Functions | |
| RandomShuffler ()=default | |
| Default constructor; the engine starts from its default seed. | |
| RandomShuffler (int seed) | |
Constructor seeding the engine with seed. | |
| template<class RandomAccessIterator > | |
| void | portable_random_shuffle (RandomAccessIterator first, RandomAccessIterator last) |
| void | seed (uint64_t value) |
Private Member Functions | |
| std::ptrdiff_t | randomIndex_ (std::ptrdiff_t upper) |
A uniform index in [0, upper], drawn so that every platform gets the same one. | |
Private Attributes | |
| std::mt19937_64 | rng_ |
Portable random shuffle with a reproducible, platform-independent random sequence.
The engine is the standard MT19937-64; the index distribution that makes the sequence platform-independent is drawn in the implementation. A copy continues the sequence independently of its source.
|
default |
Default constructor; the engine starts from its default seed.
|
inlineexplicit |
Constructor seeding the engine with seed.
|
inline |
References first.
Referenced by RANSAC< TModelType >::ransac().
|
private |
A uniform index in [0, upper], drawn so that every platform gets the same one.
|
inline |
Referenced by RANSAC< TModelType >::setSeed().
|
private |