addEdge(edge) {
    let source = this.vertices[edge.sourceId];
    let target = this.vertices[edge.targetId];
    edge.id = this.edges.length;
    this.edges.push(edge);
    this.vertexIdsToEdgeId[edge.sourceId + '_' + edge.targetId] = edge.id;
    this.vertexIdsToEdgeId[edge.targetId + '_' + edge.sourceId] = edge.id;
    edge.isPartOfAromaticRing = source.value.isPartOfAromaticRing && target.value.isPartOfAromaticRing;
    source.value.bondCount += edge.weight;
    target.value.bondCount += edge.weight;
    source.edges.push(edge.id);
    target.edges.push(edge.id);
    return edge.id;
  }
Add an edge to the graph.

@param {Edge} edge A new edge.
@returns {Number} The edge id of the new edge.