Package de.mh4j.solver.genetic

Examples of de.mh4j.solver.genetic.Couple


            if (parent1 == null && probabilitySum >= pointer1) {
                parent1 = genome;
            }
            else if (probabilitySum >= pointer2) {
                return new Couple(parent1, genome);
            }
        }

        throw new IllegalStateException("this should never happen");
    }
View Full Code Here


    }

    private Couple getCouple(GenePool<GenericGenomeType> genePool) {
        Genome parent1 = selectMate(genePool);
        Genome parent2 = selectMate(genePool);
        return new Couple(parent1, parent2);
    }
View Full Code Here

        Genome[] genomes = genePool.toArray();
        for (int i = 0; i < numberOfPairs; i++) {
            Genome parent1 = selectMate(genomes);
            Genome parent2 = selectMate(genomes);
            couples.add(new Couple(parent1, parent2));
        }
        return couples;
    }
View Full Code Here

TOP

Related Classes of de.mh4j.solver.genetic.Couple

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.