for( Iterator<Graph> i = union.getSubGraphs().iterator(); i.hasNext(); )
collectLeafGraphs( i.next(), prevLeaves );
}
else if( graph instanceof Dyadic ) {
Dyadic dyadic = ((Dyadic) graph);
if( dyadic.getL() instanceof Graph )
collectLeafGraphs( (Graph) dyadic.getL(), prevLeaves );
if( dyadic.getR() instanceof Graph )
collectLeafGraphs( (Graph) dyadic.getR(), prevLeaves );
}
else if( graph instanceof InfGraph ) {
collectLeafGraphs( ((InfGraph) graph).getRawGraph(), prevLeaves );
}
else if( leafGraphs.add( graph ) && !prevLeaves.contains( graph ) ) {