2008-11-29 15:30:50 +00:00
|
|
|
|
|
|
|
#ifndef BOOST_MT_INCLUDED
|
|
|
|
#define BOOST_MT_INCLUDED
|
|
|
|
|
|
|
|
namespace boost
|
|
|
|
{
|
|
|
|
|
|
|
|
// A very minimal implementation. No mersenne_twister at all,
|
2009-01-08 04:25:35 +00:00
|
|
|
// but it should generate some randomness though
|
2008-11-29 15:30:50 +00:00
|
|
|
class mt19937
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
mt19937(unsigned int seed)
|
|
|
|
{
|
|
|
|
::srand(seed);
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned int operator () (void)
|
|
|
|
{
|
|
|
|
return ::rand();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2009-01-12 22:26:11 +00:00
|
|
|
#endif
|