org.encog.ml.ea.sort
Class MinimizeAdjustedScoreComp

java.lang.Object
  extended by org.encog.ml.ea.sort.AbstractGenomeComparator
      extended by org.encog.ml.ea.sort.MinimizeAdjustedScoreComp
All Implemented Interfaces:
Serializable, Comparator<Genome>, GenomeComparator

public class MinimizeAdjustedScoreComp
extends AbstractGenomeComparator
implements Serializable

Use this comparator to minimize the adjusted score.

See Also:
Serialized Form

Constructor Summary
MinimizeAdjustedScoreComp()
           
 
Method Summary
 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

MinimizeAdjustedScoreComp

public MinimizeAdjustedScoreComp()
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.