es.udc.gii.common.eaf.algorithm.fitness.comparator
Class NSGA2Comparator<T extends NSGA2Individual>

java.lang.Object
  extended by es.udc.gii.common.eaf.algorithm.fitness.comparator.FitnessComparator<T>
      extended by es.udc.gii.common.eaf.algorithm.fitness.comparator.NSGA2Comparator<T>
All Implemented Interfaces:
java.util.Comparator<T>

public class NSGA2Comparator<T extends NSGA2Individual>
extends FitnessComparator<T>

Implements the crowding comparison operator.

Given two NSGA2Individuals i1 and i2, i1 < i2 iif i1.rank < i2.rank or i1.rank = i2.rank and i1.crowding > i2.crowding.

Author:
rafa

Constructor Summary
NSGA2Comparator()
           
 
Method Summary
 int compare(T o1, T o2)
          Compares to individuals inducing an ordering.
 
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
 

Constructor Detail

NSGA2Comparator

public NSGA2Comparator()
Method Detail

compare

public int compare(T o1,
                   T o2)
Description copied from class: FitnessComparator
Compares to individuals inducing an ordering. Note: this comparator imposes orderings that are inconsistent with equals.

Specified by:
compare in interface java.util.Comparator<T extends NSGA2Individual>
Specified by:
compare in class FitnessComparator<T extends NSGA2Individual>