Search code examples
c++eigen3

Eigen3 Matrix Random


i want to use the Eigen3 library with the random number generator Mersenne Twister, is there a simple way to extend eigen (simple) ?

I cannot find in the documentation of eigen what random number generator they are using and if its thread safe?


Solution

  • See this page for an example showing how to use C++11 random generators within Eigen. You can easily adapt it to use the std::mersenne_twister_engine engine.