JuliaGraphs / JuliaGraphs/GraphPlot.jl
spring_layout does not use the correct Fruchterman-Reingold aglorithm
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 213
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
The documentation for spring_layoutsays, 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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the spring_layout implementation and its documentation, then compare the documented Fruchterman-Reingold formulas with the formulas actually used. Determine whether the modified forces are intentional or should match the original algorithm; done means the implementation and documentation agree, with behavior checked against the chosen formulas.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100