FullyConnectedModuleMutation extends ModuleMutation { @Override public void addModule(TWEANNGenotype genotype) { int linksAdded = genotype.fullyConnectedModeMutation(); int[] subs = new int[linksAdded]; for (int i = 0; i < linksAdded; i++) { subs[i] = i + 1; } cullForBestWeight(genotype, subs); } FullyConnectedModuleMutation(); @Override boolean perform(); @Override void addModule(TWEANNGenotype genotype);  }
@Test public void testAddModule() { ArrayList<LinkGene> links = tg1.links; fcmm.addModule(tg1); assertFalse(tg1.numModules == tg2.numModules()); assertEquals(links.size(), tg1.links.size()); assertTrue(links.equals(tg1.links)); }