mstree.kruskal {RBGL}R Documentation

Kruskal's minimum spanning tree in boost

Description

returns list of two matrices: 2XNE of edges of MST and 1XNE of weights of these edges, and of the vector of nodes

Usage

mstree.kruskal(x) # now x assumed to be Bioconductor graph graphNEL

Arguments

x instance of class graphNEL from Bioconductor graph class

Details

calls to kruskal minimum spanning tree

Value

list of two matrices and vector of nodes, see above

Note

Very preliminary

Author(s)

VJ Carey <stvjc@channing.harvard.edu>

Examples

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]]))

[Package Contents]