Here you can find the source of toInt(double[][] data)
public static int[][] toInt(double[][] data)
//package com.java2s; //License from project: Apache License public class Main { public static int[][] toInt(double[][] data) { int[][] newdata = new int[data.length][]; for (int r = 0; r < data.length; r++) { newdata[r] = new int[data[r].length]; for (int c = 0; c < data[r].length; c++) newdata[r][c] = (int) data[r][c]; }// w ww . j a v a2 s . co m return newdata; } }