diff --git a/ea/Ub7/PBIL/src/PBilIndividual.java b/ea/Ub7/PBIL/src/PBilIndividual.java index c4c628e..5b61585 100644 --- a/ea/Ub7/PBIL/src/PBilIndividual.java +++ b/ea/Ub7/PBIL/src/PBilIndividual.java @@ -139,45 +139,6 @@ return m_GenotypeLength; } - // /** - // * This method performs a simple one point mutation in the genotype - // (script - // * 5.2.2). Please use the tools.RandomNumberGenerator - // */ - // public void mutate() { - // m_Genotype.flip(RandomNumberGenerator - // .randomInt(0, m_GenotypeLength - 1)); - // } - - // /** - // * This method performs a simple one point crossover of two GAIndividuals - // * (script 5.2.1). Please use the tools.RandomNumberGenerator - // * - // * @return An array of length 2 with the two resulting GAIndivuals - // */ - // public static PBilIndividual[] crossover(PBilIndividual ind1, - // PBilIndividual ind2) { - // assert ind1.m_GenotypeLength == ind2.m_GenotypeLength; - // - // int splitPoint = RandomNumberGenerator.randomInt(0, - // ind1.m_GenotypeLength - 1); - // PBilIndividual ind1Clone = (PBilIndividual) ind1.clone(); - // PBilIndividual ind2Clone = (PBilIndividual) ind2.clone(); - // for (int i = splitPoint; i < ind1Clone.m_GenotypeLength; i++) { - // ind1Clone.m_Genotype.set(i, ind2.m_Genotype.get(i)); - // ind2Clone.m_Genotype.set(i, ind1.m_Genotype.get(i)); - // - // } - // System.out.println("______"); - // System.out.println(ind1.getStringRepresentation()); - // System.out.println(ind2.getStringRepresentation()); - // System.out.println(splitPoint); - // System.out.println(ind1Clone.getStringRepresentation()); - // System.out.println(ind2Clone.getStringRepresentation()); - - // return new PBilIndividual[] { ind2Clone, ind1Clone }; - // } - /** * This method initializes the GA genotype randomly. Please use the * tools.RandomNumberGenerator