Rather than applying gravity to the entire graph, we now apply it to individual
nodes, such that disconnected nodes and subgraphs still have a tendency to drift
towards the center. In addition, rather than using a standard gravitational
force that drops quadratically with distance, we use a weak spring who force
increases with distance. This makes the gravitational effect less noticeable
near the center, and also makes the effect stronger the more the nodes drift
from the center. To balance the center "gravity" with the repulsive charge
force, we also normalize the strength of the gravity based on the number of
nodes in the graph.
Use the Floyd-Warshall algorithm to compute the shortest path between nodes, and
use that graph theoretic distance as the distance constraint for the Gauss-
Seidel relaxation. In addition, have the constraint alpha decay over time, as in
Simulated Annealing.