Created
August 21, 2017 22:35
-
-
Save TheBuzzSaw/2bc1e4715ce6a1159d9407f6adc21f40 to your computer and use it in GitHub Desktop.
Normal distributions
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
| #include <iostream> | |
| #include <random> | |
| #include <ctime> | |
| using namespace std; | |
| int main(int argc, char** argv) | |
| { | |
| mt19937 mt(time(nullptr)); | |
| normal_distribution<double> distribution(0.0, 4.0); | |
| for (int i = 0; i < 16; ++i) | |
| { | |
| cout << distribution(mt) << '\n'; | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment