public static int[][] toInt(double[][] array) {
        int[][] n = new int[array.length][array[0].length];
        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array[0].length; j++) {
                n[i][j] = (int) array[i][j];
            }
        }
        return n;
    }
public static int [ ] [ ] toInt ( double [ ] [ ] array ) { int [ ] [ ] n = new int [ array . length ] [ array [ 0 ] . length ] ; for ( int i = 0 ; i < array . length ; i ++ ) { for ( int j = 0 ; j < array [ 0 ] . length ; j ++ ) { n [ i ] [ j ] = ( int ) array [ i ] [ j ] ; } } return n ; }
2-D Double array to integer array.

@param array Double array.
@return Integer array.