MLUG: Re: [MLUG] grab_random_lines
Re: [MLUG] grab_random_lines
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mike Miller wrote:
> On Thu, 22 May 2008, Stephen Montgomery-Smith wrote:
> 
>>> I think gcc has a Mersenne Twister MT19937 option, which is what I 
>>> would typically choose, when choice is available.
>> How do you invoke it?
> 
> Sorry.  I don't know.  I hired someone to do some c programming a while 
> back and she claimed to be using MT19937 in gcc, but she might have added 
> it from some external code.  If you look for MT19937.cc or MT19937.c you 
> will find code for Mersenne Twister.
> 
> I also see that MT19937 is associated with libstdc++ and gcc.  Does this 
> help?:
> 
> http://www.ib.cnea.gov.ar/~oop/biblio/libstdc++/classstd_1_1tr1_1_1mersenne__twister.html
> 
> Mike
> 
> _______________________________________________
> members mailing list
> EMAIL:PROTECTED
> http://mlug.missouri.edu/mailman/listinfo/members
> 
> 


Ahah - you have it in perl:

http://search.cpan.org/dist/Math-Random-MT/

After installing the module, just add this line to my code:

use Math::Random::MT qw(srand rand);

_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members