nikbelikov / tsp-solver

This package will help you in solving the traveling salesman problem.
https://www.npmjs.com/package/@nikbelikov/tsp-solver
ISC License
7 stars 2 forks source link

result contains null #1

Closed jackneer closed 4 years ago

jackneer commented 4 years ago

I passed points with length <= 4

const POINTS = [
  { id: 0, name: "Saint Petersburg" },
  { id: 1, name: "Moscow" },
  { id: 2, name: "Pskov" },
  { id: 3, name: "Cherepovets" }  
];

the result contains null as following

[{"id":0,"name":"Saint Petersburg"},null,null,{"id":3,"name":"Cherepovets"}]

I tried locally and online https://codesandbox.io/s/cezb9 both v0.3.2 and got the same result.

nikbelikov commented 4 years ago

@jackneer Oh, this is a bug. I will fix it soon. Thank you!

nikbelikov commented 4 years ago

@jackneer fixed in 0.4.0 https://codesandbox.io/s/magical-newton-etqts