public static ArrayList<Hop> deepCopyHopsDag(ArrayList<Hop> hops) throws HopsException {
  ArrayList<Hop> ret=new ArrayList<Hop>();
  try {
    HashMap<Long,Hop> memo=new HashMap<Long,Hop>();
    for (    Hop hopRoot : hops)     ret.add(rDeepCopyHopsDag(hopRoot,memo));
  }
 catch (  Exception ex) {
    throw new HopsException(ex);
  }
  return ret;
}

public static ArrayList < Hop > deepCopyHopsDag ( ArrayList < Hop > hops ) throws HopsException { ArrayList < Hop > ret = new ArrayList < Hop > ( ) ; try { HashMap < Long , Hop > memo = new HashMap < Long , Hop > ( ) ; for ( Hop hopRoot : hops ) ret . add ( rDeepCopyHopsDag ( hopRoot , memo ) ) ; } catch ( Exception ex ) { throw new HopsException ( ex ) ; } return ret ; }
deep copy of hops dags for parallel recompilation .
