This commit is contained in:
nim-ka
2022-10-29 02:53:16 +00:00
parent e5ba84719d
commit 790ec30845

View File

@@ -176,7 +176,7 @@ class Grid {
]
}
toGraph(neighbors = "getAdjNeighbors", cxn = (node, cxnNode) => node.addCxn(cxnNode, cxnNode.val)) {
graphify(neighbors = "getAdjNeighbors", cxn = (node, cxnNode) => node.addCxn(cxnNode, cxnNode.val)) {
this.mapMut((e) => new Node(e))
this.forEach((e, pt) => this[neighbors](pt).forEach((pt) => cxn(e, this.get(pt))))
return