I am faced with the problem to find the closest 100 points for each 1 000 000 points in an array. Points are 2D with x and y coordinates. What I have in mind is only the brute force way using the Euclidean distance, which even multithreaded will take way too long.
Right now I have a Point class that implements Runnable containing x and y. Coordinates could be nagative and positive numbers.
Can someone suggest or write an algorithm, or just give some ideas on how I can improve performance.