public void uncollapse(Set<Integer> toUncollapse,Set<Integer> collapsedIds){
  Set<Integer> newCollapsed=new HashSet<>();
  for (Node v=getFirstNode(); v != null; v=v.getNext()) {
    int vId=(Integer)v.getInfo();
    if (toUncollapse.contains(vId) && collapsedIds.contains(vId)) {
      for (Edge e=v.getFirstOutEdge(); e != null; e=v.getNextOutEdge(e)) {
        Node w=e.getTarget();
        newCollapsed.add((Integer)w.getInfo());
      }
    }
  }
  collapsedIds.removeAll(toUncollapse);
  collapsedIds.addAll(newCollapsed);
}

public void uncollapse ( Set < Integer > toUncollapse , Set < Integer > collapsedIds ) { Set < Integer > newCollapsed = new HashSet < > ( ) ; for ( Node v = getFirstNode ( ) ; v != null ; v = v . getNext ( ) ) { int vId = ( Integer ) v . getInfo ( ) ; if ( toUncollapse . contains ( vId ) && collapsedIds . contains ( vId ) ) { for ( Edge e = v . getFirstOutEdge ( ) ; e != null ; e = v . getNextOutEdge ( e ) ) { Node w = e . getTarget ( ) ; newCollapsed . add ( ( Integer ) w . getInfo ( ) ) ; } } } collapsedIds . removeAll ( toUncollapse ) ; collapsedIds . addAll ( newCollapsed ) ; }
modify the given set of collapsedids so that the touncollapse ids are uncollapsed
