In my program, I have a set of points. For purposes of rescaling, I am searching for the two nodes that are furthest apart, and then computing a factor by which to multiply
If you perform this query often but the points do not change much, you can perform precalculations that can speed things up.
Each point can store the farthest point from it and recheck on every point addition if the new point is farther.
When you query you just go thru all the points and look at their cached points.
You end up with O(n) for new point entry and O(n) for farthest apart query.