1.0.0 • Published 5 years ago
minimum-relocation v1.0.0
Find minimum relocations
Install
npm install minimum-relocation
Import module
let mindistpath = require("minimum-relocation")
Use module
//input should be in following format
let input = [{
id: 1, x: 50, y: 80
},{
id: 2, x: 150, y: 70
},{
id: 3, x: 80, y: 100
} ]
//invoke module to get the minimum distance path
let bestpath = mindistpath(input);
//get the result in following format
[ '2', '1', '3' ]
1.0.0
5 years ago