263264265266267268269270271272273
} else { TIntObjectIterator<BitSet> iter = edges.iterator(); while (iter.hasNext()) { iter.advance(); int v = iter.key(); if (vertices.contains(v)) { BitSet b = iter.value(); BitSet b2 = new BitSet(); b2.or(b); copy.edges.put(v, b2);
284285286287288289290291292293294
} else { TIntObjectIterator<BitSet> iter = inEdges.iterator(); while (iter.hasNext()) { iter.advance(); int v = iter.key(); if (vertices.contains(v)) copy.inEdges.put(v, iter.value()); } iter = outEdges.iterator(); while (iter.hasNext()) {
291292293294295296297298299300301
copy.inEdges.put(v, iter.value()); } iter = outEdges.iterator(); while (iter.hasNext()) { iter.advance(); int v = iter.key(); if (vertices.contains(v)) copy.outEdges.put(v, iter.value()); } } return copy;