swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem about random


From: Hoe Kok Meng
Subject: Re: problem about random
Date: Tue, 29 Jan 2002 19:00:08 +0800


Snow Paul wrote:
>   I used
> [uniformIntRand getIntegerWithMin: 0 withMax: 100];
>   in order to get a random integer range from 0 to
> 100.To my suprise, I run the swarm application many
> times but I got the same "random" value.for
> instance,this time is 6 and next time also 6.I am
> confused and I suspect I have to use class
> UniformIntegerDist,How to do it?

Try running your program with the "-s" or "-S <seed>" option. The first
option sets a random seed for the random number generators. The 2nd
option is only available if u're running pretests version of Swarm 2.2.

Without either option, the seed for RNGs defaults to the default value.
Sorry, don't know what that is.

-- 
Best regards,

Hoe Kok Meng
Information Processing
Technology Research Group
MIMOS Bhd.
---
Email : address@hidden
Tel   : +603-8996 5000 ext. 6403
Fax   : +603-89960253
---
~~to love one look to the many,
to love many look to the one~~

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]