public void updateEdgeParents(Object cell,Object root){
  int childCount=getChildCount(cell);
  for (int i=0; i < childCount; i++) {
    Object child=getChildAt(cell,i);
    updateEdgeParents(child,root);
  }
  int edgeCount=getEdgeCount(cell);
  List<Object> edges=new ArrayList<Object>(edgeCount);
  for (int i=0; i < edgeCount; i++) {
    edges.add(getEdgeAt(cell,i));
  }
  Iterator<Object> it=edges.iterator();
  while (it.hasNext()) {
    Object edge=it.next();
    if (isAncestor(root,edge)) {
      updateEdgeParent(edge,root);
    }
  }
}

public void updateEdgeParents ( Object cell , Object root ) { int childCount = getChildCount ( cell ) ; for ( int i = 0 ; i < childCount ; i ++ ) { Object child = getChildAt ( cell , i ) ; updateEdgeParents ( child , root ) ; } int edgeCount = getEdgeCount ( cell ) ; List < Object > edges = new ArrayList < Object > ( edgeCount ) ; for ( int i = 0 ; i < edgeCount ; i ++ ) { edges . add ( getEdgeAt ( cell , i ) ) ; } Iterator < Object > it = edges . iterator ( ) ; while ( it . hasNext ( ) ) { Object edge = it . next ( ) ; if ( isAncestor ( root , edge ) ) { updateEdgeParent ( edge , root ) ; } } }
updates the parents of the edges connected to the given cell and all its descendants so that the edge is contained in the nearest - common - ancestor .
