(vertex1, vertex2)
| 12 | } |
| 13 | |
| 14 | addEdge(vertex1, vertex2) { |
| 15 | if (this.containsVertex(vertex1) && this.containsVertex(vertex2)) { |
| 16 | this.adjacencyMap[vertex1].push(vertex2) |
| 17 | this.adjacencyMap[vertex2].push(vertex1) |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | printGraph(output = (value) => console.log(value)) { |
| 22 | const keys = Object.keys(this.adjacencyMap) |
no test coverage detected