src/core/network/NeuralNetwork.java
public NeuralNetwork copy() throws IOException, ClassNotFoundException {
        waitToComplete();
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        ObjectOutputStream objectOutputStream = new ObjectOutputStream(byteArrayOutputStream);
        objectOutputStream.writeObject(this);
        objectOutputStream.flush();
        ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
        ObjectInputStream objectInputStream = new ObjectInputStream(byteArrayInputStream);
        NeuralNetwork neuralNetwork = (NeuralNetwork)objectInputStream.readObject();
        objectInputStream.close();
        objectOutputStream.close();
        return neuralNetwork;
    }
/**
     * Makes deep copy of neural network by using object serialization.
     *
     * @return copy of this neural network.
     * @throws IOException throws exception if copying of neural network fails.
     * @throws ClassNotFoundException throws exception if copying of neural network fails.
     */
Makes deep copy of neural network by using object serialization.
@return copy of this neural network.
@throws IOException throws exception if copying of neural network fails.
@throws ClassNotFoundException throws exception if copying of neural network fails.
Makes deep copy of neural network by using object serialization . @return copy of this neural network . @throws IOException throws exception if copying of neural network fails . @throws ClassNotFoundException throws exception if copying of neural network fails .
public NeuralNetwork copy() throws IOException, ClassNotFoundException {
        waitToComplete();
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        ObjectOutputStream objectOutputStream = new ObjectOutputStream(byteArrayOutputStream);
        objectOutputStream.writeObject(this);
        objectOutputStream.flush();
        ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
        ObjectInputStream objectInputStream = new ObjectInputStream(byteArrayInputStream);
        NeuralNetwork neuralNetwork = (NeuralNetwork)objectInputStream.readObject();
        objectInputStream.close();
        objectOutputStream.close();
        return neuralNetwork;
    }
public NeuralNetwork copy ( ) throws IOException , ClassNotFoundException { waitToComplete ( ) ; ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream ( ) ; ObjectOutputStream objectOutputStream = new ObjectOutputStream ( byteArrayOutputStream ) ; objectOutputStream . writeObject ( this ) ; objectOutputStream . flush ( ) ; ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream ( byteArrayOutputStream . toByteArray ( ) ) ; ObjectInputStream objectInputStream = new ObjectInputStream ( byteArrayInputStream ) ; NeuralNetwork neuralNetwork = ( NeuralNetwork ) objectInputStream . readObject ( ) ; objectInputStream . close ( ) ; objectOutputStream . close ( ) ; return neuralNetwork ; }
Makes deep copy of neural network by using object serialization.
Makes deep copy of neural network by using object serialization .