DeleteLinkMutation extends TWEANNMutation { public void mutate(Genotype<TWEANN> genotype) { ((TWEANNGenotype) genotype).deleteLinkMutation(); } DeleteLinkMutation(); void mutate(Genotype<TWEANN> genotype);  }
@Test public void realTest() { tg1.meltNetwork(); Parameters.parameters.setDouble("deleteLinkRate", 1.0); Parameters.parameters.setDouble("netLinkRate", 1.0); DeleteLinkMutation delete = new DeleteLinkMutation(); int numLinks = tg1.links.size(); for(int i = 1; i <= numLinks; i++){ delete.mutate(tg1); assertFalse(tg1.equals(tg2)); assertEquals(numLinks-i, tg1.links.size()); } assertEquals(tg1.links.size(), 0); delete.mutate(tg1); assertEquals(tg1.links.size(), 0); NewLinkMutation link = new NewLinkMutation(); link.mutate(tg1); assertEquals(tg1.links.size(), 1); delete.mutate(tg1); assertEquals(tg1.links.size(), 0); }