(x, y, v)
| 88 | } |
| 89 | |
| 90 | setEdgeValue (x, y, v) { |
| 91 | let result = false; |
| 92 | |
| 93 | if (defined(this.nodes[x]) && defined(this.nodes[x].edges[y])) { |
| 94 | this.nodes[x].edges[y] = this.nodes[y].edges[x] = defined(v) ? v : null; |
| 95 | result = true; |
| 96 | } |
| 97 | |
| 98 | return result; |
| 99 | } |
| 100 | |
| 101 | setNodeValue (x, v) { |
| 102 | const n = this.nodes[x]; |