public Graph next(){
  ++index;
  if (index < graphs.size()) {
    return graphs.get(index);
  }
 else {
    return null;
  }
}

public Graph next ( ) { ++ index ; if ( index < graphs . size ( ) ) { return graphs . get ( index ) ; } else { return null ; } }
successive calls to this method return successive dags in the pattern , in a more or less natural enumeration of them in which an arbitrary undirected edge is picked , oriented one way , meek rules applied , then a remaining unoriented edge is picked , oriented one way , and so on , until a dag is obtained , and then by backtracking the other orientation of each chosen edge is tried . nonrecursive , obviously . < p >
