Network implements Iterable<Neuron>,
               Serializable { public void deleteLink(Neuron a, Neuron b) { final long aId = a.getIdentifier(); final long bId = b.getIdentifier(); if (a != getNeuron(aId)) { throw new NoSuchElementException(Long.toString(aId)); } if (b != getNeuron(bId)) { throw new NoSuchElementException(Long.toString(bId)); } deleteLinkFromLinkSet(linkMap.get(aId), bId); } Network(long nextId,
            int featureSize,
            Neuron[] neuronList,
            long[][] neighbourIdList);  Network(long initialIdentifier,
                   int featureSize); Iterator<Neuron> iterator(); Collection<Neuron> getNeurons(Comparator<Neuron> comparator); long createNeuron(double[] features); void deleteNeuron(Neuron neuron); int getFeaturesSize(); void addLink(Neuron a,
                        Neuron b); void deleteLink(Neuron a,
                           Neuron b); Neuron getNeuron(long id); Collection<Neuron> getNeighbours(Iterable<Neuron> neurons); Collection<Neuron> getNeighbours(Iterable<Neuron> neurons,
                                            Iterable<Neuron> exclude); Collection<Neuron> getNeighbours(Neuron neuron); Collection<Neuron> getNeighbours(Neuron neuron,
                                            Iterable<Neuron> exclude);  }
@Test public void testDeleteLink() { final FeatureInitializer[] initArray = { init }; final Network net = new NeuronSquareMesh2D(2, false, 2, false, SquareNeighbourhood.VON_NEUMANN, initArray).getNetwork(); Collection<Neuron> neighbours; net.deleteLink(net.getNeuron(0), net.getNeuron(1)); neighbours = net.getNeighbours(net.getNeuron(0)); Assert.assertFalse(neighbours.contains(net.getNeuron(1))); neighbours = net.getNeighbours(net.getNeuron(1)); Assert.assertTrue(neighbours.contains(net.getNeuron(0))); }