Here you can find the source of castToInts(final double[] doubles)
public static int[] castToInts(final double[] doubles)
//package com.java2s; public class Main { public static int[] castToInts(final double[] doubles) { final int[] ints = new int[doubles.length]; for (int i = 0; i < doubles.length; ++i) ints[i] = (int) doubles[i]; return ints; }/*from w w w . ja v a 2 s . c o m*/ public static int[][] castToInts(final double[][] doubles) { final int[][] ints = new int[doubles.length][]; for (int l = 0; l < doubles.length; ++l) ints[l] = castToInts(doubles[l]); return ints; } }