Created
March 19, 2017 08:47
-
-
Save thawk/36f7e412edd2f5c0887282820ed6aade to your computer and use it in GitHub Desktop.
Test boost::random
This file contains 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 <boost/filesystem/path.hpp> | |
#include <iostream> | |
#include <boost/random.hpp> | |
#include <boost/cstdint.hpp> | |
#include <boost/integer_traits.hpp> | |
using boost::filesystem::path; | |
using namespace std; | |
int main() | |
{ | |
boost::random::mt19937 rng; | |
boost::random::uniform_int_distribution<boost::int64_t> dist( | |
1, boost::integer_traits<boost::int64_t>::const_max); | |
for (size_t i=0; i<10; ++i) | |
{ | |
cout << i << "\t" << dist(rng) << endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output: