Here you can find the source of copyArray(double[][] d)
public static double[][] copyArray(double[][] d)
//package com.java2s; //License from project: Open Source License public class Main { public static double[][] copyArray(double[][] d) { int size = d.length; double res[][] = new double[size][size]; for (int r = 0; r < size; r++) for (int c = 0; c < size; c++) res[r][c] = d[r][c];//w w w . ja v a2s.c o m return (res); } }