public Matrix copy(){
  Matrix X=new Matrix(m,n);
  double[][] C=X.getArray();
  for (int i=0; i < m; i++) {
    for (int j=0; j < n; j++) {
      C[i][j]=A[i][j];
    }
  }
  return X;
}

public Matrix copy ( ) { Matrix X = new Matrix ( m , n ) ; double [ ] [ ] C = X . getArray ( ) ; for ( int i = 0 ; i < m ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { C [ i ] [ j ] = A [ i ] [ j ] ; } } return X ; }
make a deep copy of a matrix
