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