Skip to content

semibran/graph-mst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

91bc763 · Mar 7, 2018

History

10 Commits
Mar 7, 2018
Mar 6, 2018
Mar 6, 2018
Mar 4, 2018
Mar 6, 2018
Mar 6, 2018

Repository files navigation

graph-mst

generates a minimum spanning tree from a weighted graph

demo

This module exposes the span function, which uses Prim's algorithm to generate a minimum spanning tree from a weighted graph.

usage

span(graph) -> tree

Converts a graph with the fields nodes : [ x, y ] and edges : { endpoints : [ ...nodeIndices ], weight: Number } to a minimum spanning tree.

Releases

No releases published

Packages

No packages published