Template Function mrpt::random::partial_shuffle

Function Documentation

template<class RandomIt, class URBG>
void mrpt::random::partial_shuffle(RandomIt first, RandomIt last, URBG &&g, size_t N)

Shuffle the first N elements of a sequence. Note that elements at positions [N:end] may also change if they are randomly picked for permutation with the first [0,N-1] elements.

Note

[New in MRPT 2.4.0]