Here you can find the source of matrixCastToDouble(String[][] m)
public static double[][] matrixCastToDouble(String[][] m)
//package com.java2s; //License from project: Open Source License public class Main { public static double[][] matrixCastToDouble(String[][] m) { double[][] matrixDouble = new double[m.length][]; for (int i = 0; i < m.length; i++) matrixDouble[i] = arrayCastToDouble(m[i]); return matrixDouble; }/*from w ww .j a v a 2 s .co m*/ public static double[] arrayCastToDouble(int[] arrayInt) { double[] arrayDouble = new double[arrayInt.length]; for (int i = 0; i < arrayDouble.length; i++) arrayDouble[i] = (double) arrayInt[i]; return arrayDouble; } public static double[] arrayCastToDouble(Integer[] arrayInt) { double[] arrayDouble = new double[arrayInt.length]; for (int i = 0; i < arrayDouble.length; i++) arrayDouble[i] = arrayInt[i].doubleValue(); return arrayDouble; } public static double[] arrayCastToDouble(Double[] arrayIn) { double[] arrayDouble = new double[arrayIn.length]; for (int i = 0; i < arrayDouble.length; i++) arrayDouble[i] = arrayIn[i]; return arrayDouble; } public static double[] arrayCastToDouble(float[] arrayFloat) { double[] arrayDouble = new double[arrayFloat.length]; for (int i = 0; i < arrayDouble.length; i++) arrayDouble[i] = (double) arrayFloat[i]; return arrayDouble; } public static double[] arrayCastToDouble(String[] arrayString) { double[] arrayDouble = new double[arrayString.length]; for (int i = 0; i < arrayDouble.length; i++) arrayDouble[i] = Double.parseDouble(arrayString[i]); return arrayDouble; } }