Skip to content

Instantly share code, notes, and snippets.

@davibarreira
Created November 7, 2020 15:36
Show Gist options
  • Save davibarreira/6062eac1f77c7ecdca3a222097ed5c4c to your computer and use it in GitHub Desktop.
Save davibarreira/6062eac1f77c7ecdca3a222097ed5c4c to your computer and use it in GitHub Desktop.
MST with Julia
g_mst = SimpleWeightedGraph(ncol(df))
for i in kruskal_mst(g,minimize=false)
add_edge!(g_mst,i.src,i.dst,i.weight)
end
gplot(g_mst,nodelabel=names(df))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment