mst: Compute Minimum Spanning Tree

Description Usage Arguments Value Examples

View source: R/mst.R

Description

mst Compute a minimum spanning tree using Prim's algorithm

Usage

1
mst(D)

Arguments

D

A distance matrix

Value

MST a data frame object of 3 columns containing the parent nodes, child nodes, and corresponding weight of the MST edge

Examples

1
2
3
4
5
X <- runif(10,0,1)
Y <- runif(10,0,1)
D <- dist(cbind(X,Y))

mst(as.matrix(D))

Datasmith documentation built on May 29, 2017, 10:19 p.m.

Related to mst in Datasmith...