public function removeNode(Node $node): self
	{
		$id = $node->getId();
		if (isset($this->nodes[$id])) {
			foreach ($node->getConnectedEdges() as $e) {
				$e->remove();
			}
			unset($this->nodes[$id]);
			$this->nodeAttrIndex->removeElement($node);
			return $this;
		} else {
			throw new MissingEdgeException(sprintf("Node \"%s\" not found in the graph.", $id));
		}
	}