Menu

Problem in Random_generator ?

Knobby.M
2005-06-23
2012-09-15
  • Knobby.M

    Knobby.M - 2005-06-23

    i want to set seed for each Random_generator instance,the only way is RNG_reset but it seems set the global seed,then how to?

     
    • Andy Panov

      Andy Panov - 2005-06-23

      Hi,

      The same state for all generators seems to be a good solution in most cases, but you can have a per-generator states if you want.
      One possible way to do it is to derive your own class from some of the generator classes provided by the library and store per-generator state in your own derived class.

      Andy.

       
    • Knobby.M

      Knobby.M - 2005-06-23

      ok,that works
      thanks

      but i think it's better to add this feature in next version,cause sometime we do want to "control" the random generation

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.