In order to ease the reproduction of unit test failures across different systems, we could have a built-in random number generator for the unit tests only. For instance, this implementation seems rather lightweight: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/mt19937ar.c
That's a good idea. I guess for our purposes even a simple LCG would be sufficient https://en.wikipedia.org/wiki/Linear_congruential_generator That is what glibc uses at the moment for rand(), so on many systems nothing will change (if we use the same coefficients). But MT19937 is also simple enough and I don't think the initialization cost really matters, either.
Much simpler indeed: http://www.mscs.dal.ca/~selinger/random/
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/746.