@SuppressWarnings("unchecked") protected List<N> computeOrder(DirectedGraph<N> g){
  stmtToColor=new IdentityHashMap<Object,Object>((3 * g.size()) / 2);
  indexStack=new int[g.size()];
  stmtStack=(N[])new Object[g.size()];
  order=new LinkedList<N>();
  graph=g;
{
    Iterator<N> stmtIt=g.iterator();
    while (stmtIt.hasNext()) {
      N s=stmtIt.next();
      if (stmtToColor.get(s) == null)       visitNode(s);
    }
  }
  indexStack=null;
  stmtStack=null;
  stmtToColor=null;
  return order;
}

@ SuppressWarnings ( "unchecked" ) protected List < N > computeOrder ( DirectedGraph < N > g ) { stmtToColor = new IdentityHashMap < Object , Object > ( ( 3 * g . size ( ) ) / 2 ) ; indexStack = new int [ g . size ( ) ] ; stmtStack = ( N [ ] ) new Object [ g . size ( ) ] ; order = new LinkedList < N > ( ) ; graph = g ; { Iterator < N > stmtIt = g . iterator ( ) ; while ( stmtIt . hasNext ( ) ) { N s = stmtIt . next ( ) ; if ( stmtToColor . get ( s ) == null ) visitNode ( s ) ; } } indexStack = null ; stmtStack = null ; stmtToColor = null ; return order ; }
orders in pseudo - topological order .
