static void pruneIncorrectShape ( FastQueue < Grid > grids , int numRows , int numCols ) { // prune clusters which can't be a member calibration target for ( int i = grids . size ( ) - 1 ; i >= 0 ; i -- ) { Grid g = grids . get ( i ) ; if ( ( g . rows != numRows || g . columns != numCols ) && ( g . rows != numCols || g . columns != numRows ) ) { grids . remove ( i ) ; } } }
Remove grids which cannot possible match the expected shape