1.0.0 • Published 5 years ago

minimum-relocation v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

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' ]