Package org.encog.ml.genetic.genome

Examples of org.encog.ml.genetic.genome.ArrayGenome.copy()


    // handle cut section
    for (int i = 0; i < geneLength; i++) {
      if (!((i < cutpoint1) || (i > cutpoint2))) {
        offspring1.copy(father,i,i);
        offspring2.copy(mother,i,i);
      }
    }

    // handle outer sections
    for (int i = 0; i < geneLength; i++) {
View Full Code Here


    // handle outer sections
    for (int i = 0; i < geneLength; i++) {
      if ((i < cutpoint1) || (i > cutpoint2)) {
        offspring1.copy(mother,i,i);
        offspring2.copy(father,i,i);
      }
    }
  }

  /**
 
View Full Code Here

    final ArrayGenome parent = (ArrayGenome) parents[parentIndex];
    offspring[offspringIndex] = this.owner.getPopulation()
        .getGenomeFactory().factor();
    final ArrayGenome child = (ArrayGenome) offspring[offspringIndex];

    child.copy(parent);

    final int length = parent.size();
    int iswap1 = (int) (rnd.nextDouble() * length);
    int iswap2 = (int) (rnd.nextDouble() * length);

 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.