minimum-relocation
v1.0.0
Published
Downloads
10
Readme
Find minimum relocations
Install
npm install minimum-relocationImport 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' ]
