code: @Override public DirectedGraph<DirectedEdge> copy(Set<Integer> vertices) {
          // special case for If the called is requesting a copy of the entire
          // graph, which is more easily handled with the copy constructor
          if (vertices.size() == order() && vertices.equals(vertices()))
              return new SparseDirectedGraph(this);
          SparseDirectedGraph g = new SparseDirectedGraph();
          for (int v : vertices) {
              if (!contains(v))
                  throw new IllegalArgumentException(
                      "Requested copy with non-existant vertex: " + v);
              g.add(v);
              for (DirectedEdge e : getAdjacencyList(v))
                  if (vertices.contains(e.from()) && vertices.contains(e.to()))
                      g.add(e);
          }
          return g;
      }
docs: {@inheritDoc}