public void process ( List < List < SquareNode > > clusters ) { valid . reset ( ) ; for ( int i = 0 ; i < clusters . size ( ) ; i ++ ) { List < SquareNode > graph = clusters . get ( i ) ; if ( graph . size ( ) < minimumElements ) continue ; switch ( checkNumberOfConnections ( graph ) ) { case 1 : orderIntoLine ( graph ) ; break ; case 2 : orderIntoGrid ( graph ) ; break ; // default: System.out.println("Failed number of connections. size = "+graph.size()); } } }
Converts the set of provided clusters into ordered grids .