(x, y)
| 46 | } |
| 47 | |
| 48 | del (x, y) { |
| 49 | let result = false; |
| 50 | |
| 51 | if (defined(this.nodes[x]) && defined(this.nodes[x].edges[y])) { |
| 52 | delete this.nodes[x].edges[y]; |
| 53 | delete this.nodes[y].edges[x]; |
| 54 | result = true; |
| 55 | } |
| 56 | |
| 57 | return result; |
| 58 | } |
| 59 | |
| 60 | delNode (x) { |
| 61 | const n = this.nodes[x]; |