Here you can find the source of toDouble(float[][] a)
public static final double[][] toDouble(float[][] a)
//package com.java2s; //License from project: Apache License public class Main { public static final double[][] toDouble(float[][] a) { double[][] b = new double[a.length][a[0].length]; for (int i = 0; i < a.length; i++) for (int j = 0; j < a[0].length; j++) { b[i][j] = a[i][j];// ww w .j ava 2 s. c o m } return b; } public static final double[][] toDouble(int[][] a) { double[][] b = new double[a.length][a[0].length]; for (int i = 0; i < a.length; i++) for (int j = 0; j < a[0].length; j++) { b[i][j] = a[i][j]; } return b; } public static final double[] toDouble(float[] a) { double[] b = new double[a.length]; for (int i = 0; i < a.length; i++) { b[i] = a[i]; } return b; } public static final double[] toDouble(int[] a) { double[] b = new double[a.length]; for (int i = 0; i < a.length; i++) { b[i] = a[i]; } return b; } public static final double[] toDouble(long[] a) { double[] b = new double[a.length]; for (int i = 0; i < a.length; i++) { b[i] = a[i]; } return b; } }