I'm using the Random
class in Java as a pseudo-random number generator. I'm using the function nextDouble a lot of times (~10^5). How many times before I have to reseed to prevent from getting the same numbers? Is reseeding needed?
Random generator = new Random(); double[] numbers = new double[n]; for (int i = 0; i < n; i++) numbers[i] = generator.nextDouble();
This is for an experiment, the numbers will be used as coordinates for points on a space, so I want the distribution to be as uniform as possible.
Also how do I reseed? Where do I get the int seed from?