Discussion:
[boost] [random] Request for Additional Generators
degski via Boost
2017-06-14 06:30:01 UTC
Permalink
I would like to request the addition of 2 generators to Boost.Random.

xoroshiro128+
<http://xoroshiro.di.unimi.it/xoroshiro128plus.c>

Web page: http://xoroshiro.di.unimi.it/

A very fast PRNG, (quite a lot) faster than the fastest current boost
generator, with a period of 2 ^ 128, which could/would be good for f.e.
game programming (except for shuffling, see below). It also has a state of
only 16 bytes on x64. The author states that the distribution is of higher
quality than f.e. MT19937-64
<http://www.math.sci.hiroshima-u.ac.jp/%7Em-mat/MT/VERSIONS/C-LANG/mt19937-64.c>.
It's probably best to just read the web-page, as it goes into quite some
detail and is in itself the summary of the research conducted in this area.

Other than the normal boost complications, it's very easy to implement and
I use my simplistic implementation to great satisfaction with the std and
boost distributions.

In this
<https://www.codeproject.com/Tips/1083372/Random-Number-Generator-Recommendations-for-Applic?msg=5402443#xx5402443xx>
article on CodeProject the issue of shuffling is raised. It's appears that
shuffling of large arrays of data requires a generator with extremely long
periods in order to be able to generate all the possible permutations. To
this extent I would like to see in boost a generator like George
Marsaglia's SuperKiss
<https://groups.google.com/forum/#!topic/comp.lang.fortran/QiTrbq0XeyM>
or/and a templated SFMT generator like this
<https://sourceforge.net/p/int64/svn/HEAD/tree/snips/sfmt.hpp> one.


degski
--
"*Ihre sogenannte Religion wirkt bloß wie ein Opiat reizend, betäubend,
Schmerzen aus Schwäche stillend.*" - Novalis 1798

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailma
Steven Watanabe via Boost
2017-06-14 14:15:57 UTC
Permalink
AMDG
Post by degski via Boost
I would like to request the addition of 2 generators to Boost.Random.
<snip>
I'm not going to implement them myself, but
I will accept PRs.

In Christ,
Steven Watanabe


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
degski via Boost
2017-06-15 04:35:58 UTC
Permalink
Post by Steven Watanabe via Boost
I'm not going to implement them myself, but
I will accept PRs.
In Christ,
Steven Watanabe
What would be the best (easiest) base to start from (as a model)?

degski
--
"*Ihre sogenannte Religion wirkt bloß wie ein Opiat reizend, betäubend,
Schmerzen aus Schwäche stillend.*" - Novalis 1798

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/b
Steven Watanabe via Boost
2017-06-15 14:45:06 UTC
Permalink
AMDG
Post by degski via Boost
Post by Steven Watanabe via Boost
I'm not going to implement them myself, but
I will accept PRs.
What would be the best (easiest) base to start from (as a model)?
There isn't much difference between engines.
Try linear_congruential_engine.

In Christ,
Steven Watanabe


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Loading...