/*
*   Class   DeepCopy
*
*   USAGE:  Methods for deep copying of an Object and of one, two and three dimensional arrays
*
*   WRITTEN BY: Dr Michael Thomas Flanagan
*
*   DATE:    10-11 April 2012 (Methods taken fron Conv.java)
*   AMENDED: 
*
*   DOCUMENTATION:
*   See Michael Thomas Flanagan's Java library on-line web pages:
*   http://www.ee.ucl.ac.uk/~mflanaga/java/
*   http://www.ee.ucl.ac.uk/~mflanaga/java/DeepCopy.html
*
*   Copyright (c) 2012
*
*   PERMISSION TO COPY:
*   Permission to use, copy and modify this software and its documentation for
*   NON-COMMERCIAL purposes is granted, without fee, provided that an acknowledgement
*   to the author, Michael Thomas Flanagan at www.ee.ucl.ac.uk/~mflanaga, appears in all copies.
*
*   Dr Michael Thomas Flanagan makes no representations about the suitability
*   or fitness of the software for any or for a particular purpose.
*   Michael Thomas Flanagan shall not be liable for any damages suffered
*   as a result of using, modifying or distributing this software or its derivatives.
*
***************************************************************************************/

package flanagan.math;

import java.math.*;
import java.io.IOException;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectOutputStream;
import java.io.ObjectInputStream;

import flanagan.complex.Complex;
import flanagan.complex.ComplexPoly;
import flanagan.complex.ComplexMatrix;
import flanagan.complex.ComplexErrorProp;
import flanagan.analysis.ErrorProp;
import flanagan.circuits.Phasor;


public class DeepCopy{
  
    // CONSTRUCTORS
    public DeepCopy(){
    }
    
    // COPY
    
        // COPY A ONE DIMENSIONAL ARRAY OF double
        public static double[] copy(double[] array){
            if(array==null)return null;
            int n = array.length;
            double[] copy = new double[n];
            for(int i=0; i 

Ads help maintain this website.