(vertex: StoredVertex)
| 225 | } |
| 226 | |
| 227 | public addVertex(vertex: StoredVertex): void { |
| 228 | if (this.#vertices.has(vertex.id)) { |
| 229 | throw new Error(`Vertex with id ${vertex.id} already exists`); |
| 230 | } |
| 231 | this.#vertices.set(vertex.id, vertex); |
| 232 | } |
| 233 | |
| 234 | public deleteVertex(id: ElementId): void { |
| 235 | const vertex = this.#vertices.get(id); |