GraphPlot.jl
GraphPlot.jl copied to clipboard
spring_layout does not use the correct Fruchterman-Reingold aglorithm
The documentation for spring_layout
says, that the algorithm uses the the forces
Attractive force: f_a(d) = d^2 / k
Repulsive force: f_r(d) = -k^2 / d
but what it actually does, is using
Attractive force: f_a(d) = d / k
Repulsive force: f_r(d) = -k^2 / d^2
where d
is the distance between two vertices and k
is some constant. That also works, so I'm wondering, if we want to keep using this modified version or use the original version by Fruchterman and Reingold.
Networkx uses the same modified version, so either this is done on purpose or the error was copied when implementing it in Julia.
To clarify, it appears that the decision to use the alternative form is intentional. There are two options and the original FR algorithm is commented out in favor of the other form.
Is the intention of this issue to have people make points in favor of one or the other to make a final decision?
Can we close this issue @simonschoelly?