Class PointDimensionComparator
java.lang.Object
org.uma.jmetal.util.point.comparator.PointDimensionComparator
- All Implemented Interfaces:
Comparator<Point>
This class implements the
Comparator interface. It is used
to compare two points according the value of a particular dimension.- Author:
- Antonio J. Nebro, Juan J. Durillo
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
PointDimensionComparator
public PointDimensionComparator(int index) Constructor
-
-
Method Details
-
compare
Compares the objects o1 and o2.- Specified by:
comparein interfaceComparator<Point>- Parameters:
pointOne- An object that reference a double[]pointTwo- An object that reference a double[]- Returns:
- -1 if o1 invalid input: '<' o1, 1 if o1 > o2 or 0 in other case.
-