Here you can find the source of deepArrayCopy(double[][] original)
public static double[][] deepArrayCopy(double[][] original)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; public class Main { public static double[][] deepArrayCopy(double[][] original) { /*double[][] copy = original.clone(); for (int i = 0; i < copy.length; i++) {/*w ww. j a v a2s. c o m*/ copy[i] = copy[i].clone(); }*/ double[][] copy = new double[original.length][original[0].length]; for (int i = 0; i < copy.length; i++) { copy[i] = Arrays.copyOf(original[i], original[i].length); } return copy; } }