Package org.moeaframework.core
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
Modifier and TypeFieldDescriptionstatic final String
Attribute key for the fitness of a solution. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if larger fitness values are preferred; otherwise smaller fitness values are preferred.void
evaluate
(Population population) Evaluates the solutions in the specified population assigning theFITNESS_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
Attribute key for the fitness of a solution.- See Also:
-
-
Method Details
-
evaluate
Evaluates the solutions in the specified population assigning theFITNESS_ATTRIBUTE
attribute.- Parameters:
population
- the population to be evaluated
-
areLargerValuesPreferred
boolean areLargerValuesPreferred()Returnstrue
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
Returns the fitness value for the given solution.- Parameters:
solution
- the solution- Returns:
- the fitness value
-
setFitness
Sets the fitness value on the given solution.- Parameters:
solution
- the solutionvalue
- the fitness value
-