Package org.jamesii.asf.portfolios.ga

Examples of org.jamesii.asf.portfolios.ga.ListIndividual


  public void testGenomeRecombination() {

    IRandom rng = new JavaRandom();

    // Recombine 0000 and 1111
    ListIndividual parent1 = new ListIndividual(null, 4, rng);
    ListIndividual parent2 = new ListIndividual(null, 4, rng);
    parent1.generateRandomGenome(0, 4);
    parent2.generateRandomGenome(4, 4);
    boolean[] genome1 = parent1.getBooleanRepresentation();
    boolean[] genome2 = parent2.getBooleanRepresentation();
    for (int i = 0; i < 4; i++) {
      SimSystem.report(Level.INFO, genome1[i] + "  " + genome2[i]);
    }

    Pair<IIndividual, IIndividual> children = parent1.recombine(parent2);
View Full Code Here

TOP

Related Classes of org.jamesii.asf.portfolios.ga.ListIndividual

Copyright © 2018 www.massapicom. 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.