jmetal.qualityIndicator.util
Class LexicoGraphicalComparator

java.lang.Object
  extended by jmetal.qualityIndicator.util.LexicoGraphicalComparator
All Implemented Interfaces:
java.util.Comparator

public class LexicoGraphicalComparator
extends java.lang.Object
implements java.util.Comparator

This class implements the Comparator interface. It is used to compare points given as double. The order used is the lexicograhphical.


Constructor Summary
LexicoGraphicalComparator()
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          The compare method compare the objects o1 and 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
 

Constructor Detail

LexicoGraphicalComparator

public LexicoGraphicalComparator()
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
The compare method compare the objects o1 and o2.

Specified by:
compare in interface java.util.Comparator
Parameters:
o1 - An object that reference a double[]
o2 - An object that reference a double[]
Returns:
-1 if o1 < o1, 1 if o1 > o2 or 0 in other case.