I am using LightGraphs for a project. I have a distance matrix and I want to find the minimum spanning tree. I am running the following code:
T = CSV.File("samples/distance_matrix.csv")
df = DataFrame(T)
df = df[:,2:end] #because the first column has names (same as the top row)
m = Matrix(df)
sg = SimpleGraph(m)
mst = kruskal_mst(sg) ## or prim_mst(sg)
The MST that I get is incorrect. However, when I write my own kruskal functions, I get the correct the MST.
Can some tell me if I doing something wrong?
"Dense/b"will be plotted as a subgraph named
"b"which can be collapsed/expanded. so large graphs can be named accordingly for better visualization.