help with mersenne_twister
Hello all, I am having difficulty in understanding the documentation regarding the use of the pseudo-random number generators in boost::random. Below, I have created a small sample program of the type I am trying to create in order to use the various classes in boost::random with Diehard (requires a binary file of 32 bit integers for testing). This program does not compile as it says that mersenne_twister requires template arguments. I understand what that means of course, but am unsure as to what arguments should go in there. I am using MSVC++ 7.0 and would really apprechiate any assistance. Thanks! #include <iostream> using std::cout; using std::cin; #include <cstdlib> #include <boost/random/mersenne_twister.hpp> using boost::random::mersenne_twister; #include <iomanip> using std::ios; #include <fstream> using std::ofstream; int main() { ofstream file("MTRNG.bin", ios::binary); const unsigned int N = 10; unsigned int i = 0; mersenne_twister MT; for(; i != N; ++i) { file << MT; } cin.get(); return EXIT_SUCCESS; } Jon Agiato JonAgiato@nyc.rr.com
Hello all, I am having difficulty in understanding the documentation regarding the use of the pseudo-random number generators in boost::random. Below, I have created a small sample program of the type I am trying to create in order to use the various classes in boost::random with Diehard (requires a binary file of 32 bit integers for testing). This program does not compile as it says that mersenne_twister requires template arguments. I understand what that means of course, but am unsure as to what arguments should go in there. I am using MSVC++ 7.0 and would really apprechiate any assistance. Thanks! #include <iostream> using std::cout; using std::cin; #include <cstdlib> #include <boost/random/mersenne_twister.hpp> using boost::random::mersenne_twister; #include <iomanip> using std::ios; #include <fstream> using std::ofstream; int main() { ofstream file("MTRNG.bin", ios::binary); const unsigned int N = 10; unsigned int i = 0; mersenne_twister MT; for(; i != N; ++i) { file << MT; } cin.get(); return EXIT_SUCCESS; } Jon Agiato JonAgiato@nyc.rr.com [Non-text portions of this message have been removed]
participants (2)
-
agiatojon
-
Jon Agiato