Esempio n. 1
0
  public Individual[] generateChildren(Individual[] parents, Run run) {
    Individual parent = parents[0];
    Individual retVal = parent.duplicate();

    retVal.setId(parent.getId());
    retVal.setParentOne(parent.getId());
    retVal.setParentTwo(null);

    Individual[] children = {retVal};

    return children;
  }
Esempio n. 2
0
 public void addIndividual(Individual ind) {
   this.individuals.put(ind.getId(), ind);
 }