##Bug##
Bug
I only scanned your code briefly, but it looks to me like this code that is in your main loop:
currentPoint = getRandomPoint();
mitchellPoints.add(currentPoint);
currentPointIndex++;
should be outside the loop. Otherwise you are adding one completely random point along with one Mitchell point on every iteration. I think that code was only meant to generate the first point.
##Unnecessary Hashing##
Unnecessary Hashing
One other thing I noticed is that you used a HashMap to store your minimal distances. You could instead just make an array of doubles of the same length as your array of points. It would be faster because it would eliminate the need for hashing and comparing of keys (all your keys are unique).
##Bug##
I only scanned your code briefly, but it looks to me like this code that is in your main loop:
currentPoint = getRandomPoint();
mitchellPoints.add(currentPoint);
currentPointIndex++;
should be outside the loop. Otherwise you are adding one completely random point along with one Mitchell point on every iteration. I think that code was only meant to generate the first point.
##Unnecessary Hashing##
One other thing I noticed is that you used a HashMap to store your minimal distances. You could instead just make an array of doubles of the same length as your array of points. It would be faster because it would eliminate the need for hashing and comparing of keys (all your keys are unique).
Bug
I only scanned your code briefly, but it looks to me like this code that is in your main loop:
currentPoint = getRandomPoint();
mitchellPoints.add(currentPoint);
currentPointIndex++;
should be outside the loop. Otherwise you are adding one completely random point along with one Mitchell point on every iteration. I think that code was only meant to generate the first point.
Unnecessary Hashing
One other thing I noticed is that you used a HashMap to store your minimal distances. You could instead just make an array of doubles of the same length as your array of points. It would be faster because it would eliminate the need for hashing and comparing of keys (all your keys are unique).
##Bug##
I only scanned your code briefly, but it looks to me like this code that is in your main loop:
currentPoint = getRandomPoint();
mitchellPoints.add(currentPoint);
currentPointIndex++;
should be outside the loop. Otherwise you are adding one completely random point along with one Mitchell point on every iteration. I think that code was only meant to generate the first point.
##Unnecessary Hashing##
One other thing I noticed is that you used a HashMap to store your minimal distances. You could instead just make an array of doubles of the same length as your array of points. It would be faster because it would eliminate the need for hashing and comparing of keys (all your keys are unique).
##Bug##
I only scanned your code briefly, but it looks to me like this code that is in your main loop:
currentPoint = getRandomPoint();
mitchellPoints.add(currentPoint);
currentPointIndex++;
should be outside the loop. Otherwise you are adding one completely random point along with one Mitchell point on every iteration. I think that code was only meant to generate the first point.
##Bug##
I only scanned your code briefly, but it looks to me like this code that is in your main loop:
currentPoint = getRandomPoint();
mitchellPoints.add(currentPoint);
currentPointIndex++;
should be outside the loop. Otherwise you are adding one completely random point along with one Mitchell point on every iteration. I think that code was only meant to generate the first point.
##Unnecessary Hashing##
One other thing I noticed is that you used a HashMap to store your minimal distances. You could instead just make an array of doubles of the same length as your array of points. It would be faster because it would eliminate the need for hashing and comparing of keys (all your keys are unique).
##Bug##
I only scanned your code briefly, but it looks to me like this code that is in your main loop:
currentPoint = getRandomPoint();
mitchellPoints.add(currentPoint);
currentPointIndex++;
should be outside the loop. Otherwise you are adding one completely random point along with one Mitchell point on every iteration. I think that code was only meant to generate the first point.