public static double[][] clone( double[][] mat )
{
	int m = mat.length;
	int n = mat[0].length;
	double[][] res = new double[m][];
	for ( int i = 0; i < m; ++i )
	{
		res[i] = new double[n];
		for ( int j = 0; j < n; ++j )
			res[i][j] = mat[i][j];
	}
	return(res);
}