Is there a way to shuffle a vector deterministically?
That means that Every time I run the program, I want it to shuffle in the same way so that the result of my program is the same each time.
Right now I use std::random_shuffle in a loop and shuffle a list 1000 times, each time I get a different result because of that. IS there a way to do that but having the same result each time.
One of the templates for random_shuffle allows you to pass a function pointer used to select a random index in the vector. You can supply your own that performs a certain way if you like.