@Override
	public boolean add(Edge e) {
		if (contains(e)) {
			return false;
		}
		else if (nextIndex >= capacity) {
			grow();
		}

		edges[nextIndex] = e;
		edgeIndices.add(e.key(), nextIndex++);
		VertexSet vertices = parentGraph.vertices();
		Vertex from = e.from();
		Vertex to = e.to();
		if (!vertices.contains(from)) {
			vertices.add(from);
		}
		if (!vertices.contains(to)) {
			vertices.add(to);
		}

		Edge oldLastOutgoingEdge = vertices.getLastOutgoingEdge(from);
		if (oldLastOutgoingEdge == null) {
			vertices.setFirstOutgoingEdge(from, e);
			vertices.setLastOutgoingEdge(from, e);
		}
		else {
			vertices.setLastOutgoingEdge(from, e);
			setNextEdgeWithSameFrom(oldLastOutgoingEdge, e);
			setPreviousEdgeWithSameFrom(e, oldLastOutgoingEdge);
		}

		Edge oldLastIncomingEdge = vertices.getLastIncomingEdge(to);
		if (oldLastIncomingEdge == null) {
			vertices.setFirstIncomingEdge(to, e);
			vertices.setLastIncomingEdge(to, e);
		}
		else {
			vertices.setLastIncomingEdge(to, e);
			setNextEdgeWithSameTo(oldLastIncomingEdge, e);
			setPreviousEdgeWithSameTo(e, oldLastIncomingEdge);
		}
		modificationNumber++;
		return true;

	}
Adds an edge to the graph. If either endpoint is not in the graph add it.
  If the edge is already in the graph return false and do nothing. 
 @return true if and only if the edge was sucessfully added.
Ghidra/Framework/Generic/src/main/java/ghidra/util/graph/EdgeSet.java