Open BCRARL opened 5 years ago
Hi @BCRARL - does it require Optim.jl or other dependency? If so, we'd want to take a close look since we're trying not to explode the number of package dependencies in JuliaGraphs projects.
Thanks! Sorry for the delayed response.
Yeah, it requires Optim for the optimization. Kamada Kawai solves a non-linear least squares problem. $$ \min_{xi} \sum{i,j} (\sqrt{\lVert x_i-xj\rVert^2} - r{ij})^2, $$ where $r_{ij}$ is the shortest path along the graph between vertices $i$ and $j$. In my opinion,
Hi,
It's been a while since the last update. Is this layout will be added in GraphPlot? If not, is there an alternative package to add for Kamada Kawai layout?
You can just use my fork, @atthom . I haven't kept up to date with the master branch, so some minor manual merging might be necessary. If you need me to update my kamada_kawai branch, let me know.
I just merged all upstream changes, but I have not run any tests to see whether anything has broken in the meantime. If you run into an issue open it on my fork and I'll try to figure it out.
Alright, thank you for the fast update.
I actually developed something similar in the meantime, using Optim.jl. I have a significantly smaller implementation than you, though. I am sure there a lot missing but maybe there are a thing or two to take. https://gist.github.com/atthom/565f91aad416c400c280ed45b138123a
Constructive criticism is welcome :)
I've written a simple implementation of the Kamada Kawai layout using Optim. Is there interest in a general inclusion? If so, I'll clean it up and put in a pull-request.