Esempio n. 1
0
 /**
  * It crosses a real allele within two parents. If the representation is a ternary representation,
  * a crossover within intervals is not possible because there is only one gene in each position.
  * So, in this case, the gene of the second parent will be copied. In case of being a real
  * representation, a random number is generated to decide where to cross the interval. It it's
  * crossed within the inteval, the crossAllele method will do it.
  *
  * @param parent1 is the first parent classifier.
  * @param parent2 is the second parent classifier.
  */
 public void crossAllele(int i, Classifier parent1, Classifier parent2) {
   rep.crossAllele(i, parent1.rep, parent2.rep);
 } // end crossAllele