0.0.4 • Published 12 years ago

node-kruskal v0.0.4

Weekly downloads
3
License
-
Repository
github
Last release
12 years ago

node-kruskal

Given a distance array in the form of:

d = [ [0,1,2,3],
      [1,0,1,2],
      [2,1,0,1],
      [3,2,1,0] ]

calculates the Minimum Spanning Tree using Kruskal's algorithm.

Install:

npm install node-kruskal

Usage:

var kruskal = require('node-kruskal');

Example:

kruskal.kruskalMST(d, function(results){
	console.log(results);
});

Output:

3
0.0.4

12 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago