code: public static <V> DiGraph<V> union(final DiGraph<V> dg1, final DiGraph<V> dg2) {
  	return new DiGraph<V>() {
  	    public Collection<V> getRoots() {
  		return DSUtil.unionColl(dg1.getRoots(), dg2.getRoots());
  	    }
  	    public BiDiNavigator<V> getBiDiNavigator() {
  		return GraphUtil.<V>unionNav(dg1.getBiDiNavigator(),
  					     dg2.getBiDiNavigator());
  	    }
  	    public ForwardNavigator<V> getForwardNavigator() {
  		return GraphUtil.<V>unionFwdNav(dg1.getForwardNavigator(),
  						dg2.getForwardNavigator());
  	    }
  	};
      }
docs: Computes the union of two directed graphs.  The resulting
  directed graph contains all the arcs of the two original
  directed arcs.  The union <code>DiGraph</code> is not computed
  explicitly; instead, the lists of predecessors/successors are
  generated on-demand.