random number generators for calc
ttk448 at gmail.com
Wed Nov 28 11:41:39 PST 2012
> Thanks for the additional insight. Well, I can see two possibilities:
> 1) Use boost's generator for Windows platform-only, while we keep
> the glibc's version for Linux. I wonder what the situation is on
> 2) Use boost's generator for all platforms.
If there are no issues with using boost then I'd suggest 2) and use
boost's implementation of Mersenne Twister (boost::mt19937) as default
I've attached a simple example on how the boost generator works. It
also turns out to be slightly faster than rand().
What is your opinion on implementing generators for other
distributions like normal and all the ones listed under statistics
(which calculate densities but don't generate)? With boost this is
simple so just a matter of extending the UNO interface.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1803 bytes
Desc: not available
More information about the LibreOffice