Package org.opt4j.optimizer.ea
Class ElitismSelector.FitnessComparator
- java.lang.Object
-
- org.opt4j.optimizer.ea.ElitismSelector.FitnessComparator
-
- All Implemented Interfaces:
Comparator<Individual>
- Enclosing class:
- ElitismSelector
protected class ElitismSelector.FitnessComparator extends Object implements Comparator<Individual>
Comparator that sorts theIndividual
s based on their fitness values.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FitnessComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Individual o1, Individual o2)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
compare
public int compare(Individual o1, Individual o2)
- Specified by:
compare
in interfaceComparator<Individual>
-
-