public function addNode(Node $node): self
	{
		$id = $node->getId();

		if (isset($this->nodes[$id])) {
			throw new DuplicateNodeException(sprintf("Node \"%s\" already present in the graph.", $id));
		}

		// Add element
		$this->nodes[$id] = $node;

		// Update attr indexes
		$this->nodeAttrIndex->insertElement($node);

		return $this;
	}