public function addEdge(Edge $edge): self
	{
		$id = $edge->getId();

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

		// Add element
		$this->edges[$id] = $edge;

		// Update attr indexes
		$this->edgeAttrIndex->insertElement($edge);

		return $this;
	}