| mstree.kruskal {RBGL} | R Documentation |
returns list of two matrices: 2XNE of edges of MST and 1XNE of weights of these edges, and of the vector of nodes
mstree.kruskal(x) # now x assumed to be Bioconductor graph graphNEL
x |
instance of class graphNEL from Bioconductor graph class |
calls to kruskal minimum spanning tree
list of two matrices and vector of nodes, see above
Very preliminary
VJ Carey <stvjc@channing.harvard.edu>
km <- fromGXL(file(system.file("GXL/kmstEx.gxl",package="graph")))
mstree.kruskal(km)
km@edgeL$B$weights <- c(1.1,.95)
mstree.kruskal(km)
km2 <- fromGXL(file(system.file("XML/telenet.gxl",package="RBGL")))
m <- mstree.kruskal(km2)
print(sum(m[[2]]))