code: private Collection<Multigraph<T,E>> enumerateSimpleGraphs(
              Multigraph<T,E> input, List<IntPair> connected,
              int curPair, Multigraph<T,E> toCopy) {
          
          List<Multigraph<T,E>> simpleGraphs = new LinkedList<Multigraph<T,E>>();
          IntPair p = connected.get(curPair);
          // Get the set of edges between the current vertex pair
          Set<E> edges = input.getEdges(p.x, p.y);
          // Pick one of the edges and generate a graph from the remaining pairs
          for (E e : edges) {
              // Make a copy of the input graph and add this edge to the graph
              Multigraph<T,E> m = toCopy.copy(toCopy.vertices());
              // Graphs.asMultigraph(new GenericGraph<E>(toCopy));
              // Add one of the edges that connects the current pair
              m.add(e);
              // If there are more pairs to connect, then make the recursive call,
              // passing in this graph
              if (curPair + 1 < connected.size()) {
                  simpleGraphs.addAll(
                      enumerateSimpleGraphs(input, connected, curPair + 1, m));
              }
              // Otherwise, this is the last vertex pair for which an edge is to
              // be selected, so add it to the current list
              else {
                  // System.out.println("Constructed next enumeration: " + m);
                  simpleGraphs.add(m);
              }                    
          }
          return simpleGraphs;
      }
docs: Recursively enumerates the parallel edge permutations of the input graph,
  building up the graphs and returning the entire set of graphs.
  
  @param input the base graph from which edges are selected
  @param connected the list of vertex pairs that are connected by one or
  more edges
  @param curPair the index into {@code connected} which specifies the two
  vertices that need to have one of their connected edges added to
  the graph
  @param toCopy the base graph to which edges for this recursive call will
  be added.  This graph will be copied prior to modifying it.