Documentation of 'org.encog.ml.ea.sort.GenomeComparator' Java class
GenomeComparator
org.encog.ml.ea.sort

Interface GenomeComparator

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      double applyBonus(double value, double bonus)
      Apply a bonus, this is a simple percent that is applied in the direction specified by the "should minimize" property of the score function.
      double applyPenalty(double value, double bonus)
      Apply a penalty, this is a simple percent that is applied in the direction specified by the "should minimize" property of the score function.
      boolean isBetterThan(double d1, double d2)
      Determine if one score is better than the other.
      boolean isBetterThan(Genome genome1, Genome genome2)
      Determine if one genome is better than the other genome.
      boolean shouldMinimize() 
      • Methods inherited from interface java.util.Comparator

        compare, comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Method Detail

      • applyBonus

        double applyBonus(double value,
                          double bonus)
        Apply a bonus, this is a simple percent that is applied in the direction specified by the "should minimize" property of the score function.
        Parameters:
        value - The current value.
        bonus - The bonus.
        Returns:
        The resulting value.
      • applyPenalty

        double applyPenalty(double value,
                            double bonus)
        Apply a penalty, this is a simple percent that is applied in the direction specified by the "should minimize" property of the score function.
        Parameters:
        value - The current value.
        bonus - The penalty.
        Returns:
        The resulting value.
      • isBetterThan

        boolean isBetterThan(double d1,
                             double d2)
        Determine if one score is better than the other.
        Parameters:
        d1 - The first score to compare.
        d2 - The second score to compare.
        Returns:
        True if d1 is better than d2.
      • isBetterThan

        boolean isBetterThan(Genome genome1,
                             Genome genome2)
        Determine if one genome is better than the other genome.
        Parameters:
        genome1 - The first genome.
        genome2 - The second genome.
        Returns:
        True, if genome1 is better than genome2.
      • shouldMinimize

        boolean shouldMinimize()
        Returns:
        Returns true if the score should be minimized.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.