This bugzilla service is closed. All entries have been migrated to
Bug 746 - Built-in random number generator for unit tests
Summary: Built-in random number generator for unit tests
Status: NEW
Alias: None
Product: Eigen
Classification: Unclassified
Component: Tests (show other bugs)
Version: unspecified
Hardware: All All
: Normal Unknown
Assignee: Nobody
Depends on:
Reported: 2014-02-19 11:48 UTC by Gael Guennebaud
Modified: 2019-12-04 13:01 UTC (History)
3 users (show)


Description Gael Guennebaud 2014-02-19 11:48:15 UTC
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:
Comment 1 Christoph Hertzberg 2014-02-19 12:46:19 UTC
That's a good idea. I guess for our purposes even a simple LCG would be sufficient

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.
Comment 2 Gael Guennebaud 2014-02-19 14:18:44 UTC
Much simpler indeed:
Comment 3 Nobody 2019-12-04 13:01:15 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to'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:

Note You need to log in before you can comment on or make changes to this bug.