-
January 14th, 2013, 06:17 PM
#1
Generaterandom numbers with equal probability
Dear all,
I wanna to generate numbers -in range- with equal probability.
So I have minimum value and maximum value and number of generate numbers and return array of numbers, like this:
Code:
public long[] doGenerate(int min, int max, int total)
{
return ret[];
}
Thank you.
-
January 16th, 2013, 02:33 AM
#2
Re: Generaterandom numbers with equal probability
Originally Posted by shakatreh
I wanna to generate numbers -in range- with equal probability.
So I have minimum value and maximum value and number of generate numbers and return array of numbers, like this:
Use the Random class. Search the net for info on usage.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|