Interface FitnessEvaluator

All Known Implementing Classes:
AdditiveEpsilonIndicatorFitnessEvaluator, CrowdingDistanceFitnessEvaluator, HypervolumeContributionFitnessEvaluator, HypervolumeFitnessEvaluator, IndicatorFitnessEvaluator, SPEA2.StrengthFitnessEvaluator

public interface FitnessEvaluator
Evaluates a population and assigns fitness values to its solutions. This class is intended to be used by indicator-based algorithms.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Attribute key for the fitness of a solution.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if larger fitness values are preferred; otherwise smaller fitness values are preferred.
    void
    evaluate(Population population)
    Evaluates the solutions in the specified population assigning the FITNESS_ATTRIBUTE attribute.
    static double
    getFitness(Solution solution)
    Returns the fitness value for the given solution.
    static void
    setFitness(Solution solution, double value)
    Sets the fitness value on the given solution.
  • Field Details

    • FITNESS_ATTRIBUTE

      static final String FITNESS_ATTRIBUTE
      Attribute key for the fitness of a solution.
      See Also:
  • Method Details

    • evaluate

      void evaluate(Population population)
      Evaluates the solutions in the specified population assigning the FITNESS_ATTRIBUTE attribute.
      Parameters:
      population - the population to be evaluated
    • areLargerValuesPreferred

      boolean areLargerValuesPreferred()
      Returns true if larger fitness values are preferred; otherwise smaller fitness values are preferred.
      Returns:
      true if larger fitness values are preferred; otherwise smaller fitness values are preferred
    • getFitness

      static double getFitness(Solution solution)
      Returns the fitness value for the given solution.
      Parameters:
      solution - the solution
      Returns:
      the fitness value
    • setFitness

      static void setFitness(Solution solution, double value)
      Sets the fitness value on the given solution.
      Parameters:
      solution - the solution
      value - the fitness value