(x, y)
| 24 | } |
| 25 | |
| 26 | add (x, y) { |
| 27 | let result = false; |
| 28 | |
| 29 | if (defined(this.nodes[x]) && defined(this.nodes[y])) { |
| 30 | this.nodes[x].edges[y] = this.nodes[y].edges[x] = null; |
| 31 | result = true; |
| 32 | } |
| 33 | |
| 34 | return result; |
| 35 | } |
| 36 | |
| 37 | adjacent (x, y) { |
| 38 | const n = this.nodes[x]; |