Package org.moeaframework.core.fitness
Class CrowdingDistanceFitnessEvaluator
java.lang.Object
org.moeaframework.core.fitness.CrowdingDistanceFitnessEvaluator
- All Implemented Interfaces:
FitnessEvaluator
Assigns fitness values based on the crowding distance from fast non-dominated sorting.
-
Constructor Summary
ConstructorDescriptionConstructs a new crowding distance fitness evaluator. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if larger fitness values are preferred; otherwise smaller fitness values are preferred.void
evaluate
(Population population) Evaluates the fitness of solutions in the population, updating theFitness
attribute.
-
Constructor Details
-
CrowdingDistanceFitnessEvaluator
public CrowdingDistanceFitnessEvaluator()Constructs a new crowding distance fitness evaluator.
-
-
Method Details
-
evaluate
Description copied from interface:FitnessEvaluator
Evaluates the fitness of solutions in the population, updating theFitness
attribute.- Specified by:
evaluate
in interfaceFitnessEvaluator
- Parameters:
population
- the population to be evaluated
-
areLargerValuesPreferred
public boolean areLargerValuesPreferred()Description copied from interface:FitnessEvaluator
Returnstrue
if larger fitness values are preferred; otherwise smaller fitness values are preferred.- Specified by:
areLargerValuesPreferred
in interfaceFitnessEvaluator
- Returns:
true
if larger fitness values are preferred; otherwise smaller fitness values are preferred
-