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.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SortGenomesForSpecies(EvolutionaryAlgorithm theTrain)` Construct the comparator.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(Genome g1, Genome g2)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.Comparator

      `equals`

- - ### Constructor Detail

    - #### SortGenomesForSpecies

          public SortGenomesForSpecies(EvolutionaryAlgorithm theTrain)

      Construct the comparator.
      Parameters:
        `theTrain` - The trainer.

  - ### Method Detail

    - #### compare

          public int compare(Genome g1,
                    Genome g2)

      Specified by:
        `compare` in interface `Comparator<Genome>`

Copyright © 2014. All Rights Reserved.