Created
July 31, 2015 07:36
-
-
Save MasazI/ea6ce38b68f058db767b to your computer and use it in GitHub Desktop.
c++ generate rand
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::random_device rnd; // 非決定的な乱数生成器を生成 | |
std::mt19937 mt(rnd()); | |
std::uniform_int_distribution<> rand200to512(100, 512); | |
int preprocess_type = rand200to512(mt) % 512; // intにしたい場合 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment