\HeaderA{mstree.kruskal}{Kruskal's minimum spanning tree in boost}{mstree.kruskal}
\keyword{graphs}{mstree.kruskal}
\begin{Description}\relax
compute the minimum spanning tree (MST) for
a graph and return a representation in matrices
\end{Description}
\begin{Usage}
\begin{verbatim}
mstree.kruskal(x) 
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] instance of class graph 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
calls to kruskal minimum spanning tree algorithm of Boost graph library
\end{Details}
\begin{Value}
a list
\begin{ldescription}
\item[\code{edgeList}] a matrix m of dimension 2 by number of edges in the
MST, with m[i,j] the jth node in edge i
\item[\code{weights}] a vector of edge weights corresponding to the
columns of \code{edgeList}
\item[\code{nodes}] the vector of nodes of the input graph \code{x}
\end{ldescription}
\end{Value}
\begin{Author}\relax
VJ Carey <stvjc@channing.harvard.edu>
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{prim.minST}{prim.minST}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
km <- fromGXL(file(system.file("XML/kmstEx.gxl",package="RBGL"), open="r"))
mstree.kruskal(km)
edgeData(km, "B", "D", "weight") <- 1.1
edgeData(km, "B", "E", "weight") <- .95
mstree.kruskal(km)
km2 <- fromGXL(file(system.file("XML/telenet.gxl",package="RBGL"), open="r"))
m <- mstree.kruskal(km2)
print(sum(m[[2]]))
\end{ExampleCode}
\end{Examples}

