org.encog.ml.ea.sort
Class SortGenomesForSpecies
java.lang.Object
org.encog.ml.ea.sort.SortGenomesForSpecies
- All Implemented Interfaces:
- Comparator<Genome>
public class SortGenomesForSpecies
- extends Object
- implements Comparator<Genome>
Sort the gnomes for species. Sort first by score, second by birth generation.
This favors younger genomes if scores are equal.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SortGenomesForSpecies
public SortGenomesForSpecies(EvolutionaryAlgorithm theTrain)
- Construct the comparator.
- Parameters:
theTrain
- The trainer.
compare
public int compare(Genome g1,
Genome g2)
-
- Specified by:
compare
in interface Comparator<Genome>
Copyright © 2014. All Rights Reserved.