Opened 17 years ago
Closed 17 years ago
#42 closed defect (fixed)
The include files in random.h should be fixed
Reported by: | Balazs Dezso | Owned by: | Alpar Juttner |
---|---|---|---|
Priority: | minor | Milestone: | LEMON 1.0 release |
Component: | core | Version: | hg main |
Keywords: | Cc: | ||
Revision id: |
Description
The <limits> file should be directly included and <ctime> is not required.
Attachments (1)
Change History (5)
Changed 17 years ago by
Attachment: | random_include_fix.patch added |
---|
comment:2 Changed 17 years ago by
What about klao's suggestion in ticket #19 about the possibility of seeding based on pid and/or timeofday etc? It might be a good idea, and it might require <ctime>. What is your opinion?
comment:3 Changed 17 years ago by
The randomize feature is a good idea and I would welcome it in the LEMON. However the solution is not obvious. In the c++ standard I have found just two functions which could be the source of the randomness(the clock() and the time() functions), but both of them have strict limitations. The good randomize function should work whenever we use more threads with own generators approximately started in the same time. Therefore, I suggest that it should be implemented different way for each compiler(for example MSVC does not supports getpid() function just _getpid()).
comment:4 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to deba:
The patch fixes the include files in random.h
It gets into the main branch [f2d66d810c88].
Patch for include files