org.encog.ml.ea.sort

## Class SpeciesComparator

- java.lang.Object
- - org.encog.ml.ea.sort.SpeciesComparator

- All Implemented Interfaces:
    Comparator<Species>

      public class SpeciesComparator
      extends Object
      implements Comparator<Species>

  This comparator is used to compare two species. This is done by comparing the scores of the two leaders.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SpeciesComparator(EvolutionaryAlgorithm theTraining)` Create a species comparator.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(Species sp1, Species sp2)`

    - ### 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

    - #### SpeciesComparator

          public SpeciesComparator(EvolutionaryAlgorithm theTraining)

      Create a species comparator.
      Parameters:
        `theTraining` - The trainer.

  - ### Method Detail

    - #### compare

          public int compare(Species sp1,
                    Species sp2)

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

Copyright © 2014. All Rights Reserved.