This commit is contained in:
Ian Gulliver
2019-07-13 05:10:56 +00:00
parent cbe56098da
commit a3cc7ad048
3 changed files with 2 additions and 14 deletions

View File

@@ -27,9 +27,6 @@ class LayoutLink {
bfs() {
let bestByPos = new StringMap();
// shortcut to save the lookup
let cheapestCostToGoal = null;
// BFS work queue
let queue = new MinHeap((a) => a.cost);
queue.push(...[
@@ -132,7 +129,7 @@ class LayoutLink {
} else if (taken) {
// Traversing nodes has higher cost
cost += 5;
};
}
}
// Overlapping links have cost, but not if they are from or to the same