Changeset 1343:20f95cd51aba in lemon for lemon/random.h
- Timestamp:
- 04/28/15 18:13:42 (10 years ago)
- Branch:
- default
- Parents:
- 1339:93d455c647be (diff), 1341:c199e9976d93 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Phase:
- public
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/random.h
r1338 r1343 63 63 #define LEMON_RANDOM_H 64 64 65 #include <lemon/config.h> 66 65 67 #include <algorithm> 66 68 #include <iterator> … … 72 74 #include <lemon/dim2.h> 73 75 74 #ifndef WIN3276 #ifndef LEMON_WIN32 75 77 #include <sys/time.h> 76 78 #include <ctime> … … 606 608 /// \return Currently always \c true. 607 609 bool seed() { 608 #ifndef WIN32610 #ifndef LEMON_WIN32 609 611 if (seedFromFile("/dev/urandom", 0)) return true; 610 612 #endif … … 626 628 /// \param offset The offset, from the file read. 627 629 /// \return \c true when the seeding successes. 628 #ifndef WIN32630 #ifndef LEMON_WIN32 629 631 bool seedFromFile(const std::string& file = "/dev/urandom", int offset = 0) 630 632 #else … … 648 650 /// \return Currently always \c true. 649 651 bool seedFromTime() { 650 #ifndef WIN32652 #ifndef LEMON_WIN32 651 653 timeval tv; 652 654 gettimeofday(&tv, 0); -
lemon/random.h
r1340 r1343 252 252 current = state + length; 253 253 254 registerWord *curr = state + length - 1;255 registerlong num;254 Word *curr = state + length - 1; 255 long num; 256 256 257 257 num = length - shift;
Note: See TracChangeset
for help on using the changeset viewer.