random_shuffle algorithm - are identical results produced without random generator function?
- 阅读更多 关于 random_shuffle algorithm - are identical results produced without random generator function?
问题 If a random generator function is not supplied to the random_shuffle algorithm in the standard library, will successive runs of the program produce the same random sequence if supplied with the same data? For example, if std::random_shuffle(filenames.begin(), filenames.end()); is performed on the same list of filenames from a directory in successive runs of the program, is the random sequence produced the same as that in the prior run? 回答1: 25.2.11 just says that the elements are shuffled