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
ConstructorsConstructorDescriptionConstructs a new crowding distance fitness evaluator. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif larger fitness values are preferred; otherwise smaller fitness values are preferred.voidevaluate(Population population) Evaluates the fitness of solutions in the population, updating theFitnessattribute.
-
Constructor Details
-
CrowdingDistanceFitnessEvaluator
public CrowdingDistanceFitnessEvaluator()Constructs a new crowding distance fitness evaluator.
-
-
Method Details
-
evaluate
Description copied from interface:FitnessEvaluatorEvaluates the fitness of solutions in the population, updating theFitnessattribute.- Specified by:
evaluatein interfaceFitnessEvaluator- Parameters:
population- the population to be evaluated
-
areLargerValuesPreferred
public boolean areLargerValuesPreferred()Description copied from interface:FitnessEvaluatorReturnstrueif larger fitness values are preferred; otherwise smaller fitness values are preferred.- Specified by:
areLargerValuesPreferredin interfaceFitnessEvaluator- Returns:
trueif larger fitness values are preferred; otherwise smaller fitness values are preferred
-