Right now our code creates a local variable called rng at the call site of every randomization.
We want to create the engine only once so the seed is only applied once. We can store this as a data member in the Randstruct object or any other creative way. So long as the engine is created once and reused across all of our shuffle calls so that the engine is appropriately utilized.
Right now our code creates a local variable called
rng
at the call site of every randomization.We want to create the engine only once so the seed is only applied once. We can store this as a data member in the Randstruct object or any other creative way. So long as the engine is created once and reused across all of our shuffle calls so that the engine is appropriately utilized.