code: @Override public WeightedGraph<WeightedEdge> copy(Set<Integer> toCopy) {
          // Special case for if the caller is requesting a copy of the entire
          // graph, which is more easily handled with the copy constructor
          if (toCopy.size() == order() && toCopy.equals(vertices()))
              return new SparseWeightedGraph(this);
          SparseWeightedGraph g = new SparseWeightedGraph();
          for (int v : toCopy) {
              if (!contains(v))
                  throw new IllegalArgumentException(
                      "Requested copy with non-existant vertex: " + v);
              g.add(v);
              SparseWeightedEdgeSet edges = getEdgeSet(v);
              for (int v2 : toCopy) {
                  if (v == v2)
                      break;
                  if (edges.connects(v2)) {
                      for (WeightedEdge e : edges.getEdges(v2))
                          g.add(e);
                  }
              }
  //             for (WeightedEdge e : getAdjacencyList(v))
  //                 if (toCopy.contains(e.from()) && toCopy.contains(e.to()))
  //                     g.add(e);
          }
          return g;
      }
docs: {@inheritDoc}