org.encog.ml.ea.sort

## Class MaximizeAdjustedScoreComp

- java.lang.Object
- - org.encog.ml.ea.sort.AbstractGenomeComparator
  - - org.encog.ml.ea.sort.MaximizeAdjustedScoreComp

- All Implemented Interfaces:
    Serializable, Comparator<Genome>, GenomeComparator

      public class MaximizeAdjustedScoreComp
      extends AbstractGenomeComparator
      implements Serializable

  Use this comparator to maximize the adjusted score.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MaximizeAdjustedScoreComp()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(Genome p1, Genome p2)`
    `boolean` | `isBetterThan(Genome prg, Genome betterThan)` Determine if one genome is better than the other genome.
    `boolean` | `shouldMinimize()`

    - ### Methods inherited from class org.encog.ml.ea.sort.AbstractGenomeComparator

      `applyBonus, applyPenalty, isBetterThan`

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

    - #### MaximizeAdjustedScoreComp

          public MaximizeAdjustedScoreComp()

  - ### Method Detail

    - #### compare

          public int compare(Genome p1,
                    Genome p2)

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

    - #### isBetterThan

          public boolean isBetterThan(Genome prg,
                             Genome betterThan)

      Determine if one genome is better than the other genome.
      Specified by:
        `isBetterThan` in interface `GenomeComparator`
      Parameters:
        `prg` - The first genome.
        `betterThan` - The second genome.
      Returns:
        True, if genome1 is better than genome2.

    - #### shouldMinimize

          public boolean shouldMinimize()

      Specified by:
        `shouldMinimize` in interface `GenomeComparator`
      Returns:
        Returns true if the score should be minimized.

Copyright © 2014. All Rights Reserved.