Created
March 14, 2022 21:37
-
-
Save nacnudus/fb57718bc4e53cf612969c17e6d794f8 to your computer and use it in GitHub Desktop.
Euclidean Minimum Spanning Tree in Julia using mlpack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The fastest implementation available is in mlpack (C++) | |
using Pkg | |
Pkg.add("mlpack") | |
using mlpack | |
x = rand(5,2) | |
x_emst = mlpack.emst(x) | |
# A far slower implementation is in EMST.jl. As of 2022-03-14 my fork has been updated to run with Julia v0.7+using Pkg | |
using Pkg | |
Pkg.add(url="https://github.com/nacnudus/EMST.jl", rev="julia-v0.7") | |
using EMST | |
x = rand(2,5) | |
x_emst = EMST.compute_emst(x, nmin=4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment