By: hobold (hobold.delete@this.vectorizer.org),
Room: Moderated Discussions
Michael_S (already5chosen.delete@this.yahoo.com) on May 17, 2018 9:33 am wrote:
> Instead of reinventing the wheel you could just use std::random_shuffle().
> I don't say that inventing you own method of shuffle is not interesting,
> just that it was not the point of your experiment.
>
The problem was not a particular type of randomness. The problem was that careless preparation of the pointer array can lead to situations where there are many short cycles. A loop hopping along the chain of pointers might never touch all elements, but return to its starting element too early.
> Instead of reinventing the wheel you could just use std::random_shuffle().
> I don't say that inventing you own method of shuffle is not interesting,
> just that it was not the point of your experiment.
>
The problem was not a particular type of randomness. The problem was that careless preparation of the pointer array can lead to situations where there are many short cycles. A loop hopping along the chain of pointers might never touch all elements, but return to its starting element too early.


