code: @Override
      public void addEdge(DiEdge e) {
          if (!getEdges().contains(e)) { 
              super.addEdge(e);
              weights.put(e, makeDefaultWeight.apply(e));
          }
      }
docs: Attempts to adds the edge to the graph with default weight if not already present;
  If the edge is already present, does nothing.