System.err.println( "optimized" ); rowList.dump();
    protected void solve()    {        Map<State,Vertex> stateToVertex = new HashMap<State,Vertex>();                Set<Vertex> vertices = getGraph().getVertices();                for ( Vertex vertex : vertices )        {            State state = (State) vertex.getUserDatum( FloxLayout.STATE );                        stateToVertex.put( state, vertex );        }                Process process = (Process) getGraph().getUserDatum( FloxLayout.PROCESS );                rowList = new RowList();                State state = process.getStartState();                System.err.println( "start state: " + state.getName() );                Vertex vertex = stateToVertex.get( state );                    rowList.add( 0, vertex );                int curRow = 0;                Set<Vertex> seenVertices = new HashSet<Vertex>();        seenVertices.add( vertex );                while ( curRow < rowList.getDepth() )        {            List<Vertex> rowVertices = rowList.get( curRow ).getVertices();                        for ( Vertex rowVertex : rowVertices )            {                Set<Edge> edges = rowVertex.getOutEdges();                                for ( Edge edge : edges )                {                    Vertex destVertex = edge.getOpposite( rowVertex );                                        if ( ! seenVertices.contains( destVertex ) )                    {                        rowList.add( curRow+1, destVertex );                        seenVertices.add( destVertex );                    }                }                                seenVertices.add( rowVertex );            }                        ++curRow;        }                System.err.println( "initial" );        rowList.dump();                rowList.optimize();                System.err.println( "optimized" );        rowList.dump();    }