Class LexicographicalPointComparator

java.lang.Object
org.uma.jmetal.util.point.comparator.LexicographicalPointComparator
All Implemented Interfaces:
Comparator<Point>

public class LexicographicalPointComparator extends Object implements Comparator<Point>
This class implements the Comparator interface for comparing two points. The order used is lexicographical order.
Author:
Antonio J. Nebro invalid input: '<'antonio@lcc.uma.es>, Juan J. Durillo
  • Constructor Details

    • LexicographicalPointComparator

      public LexicographicalPointComparator()
  • Method Details

    • compare

      public int compare(Point pointOne, Point pointTwo)
      The compare method compare the objects o1 and o2.
      Specified by:
      compare in interface Comparator<Point>
      Parameters:
      pointOne - An object that reference a double[]
      pointTwo - An object that reference a double[]
      Returns:
      The following value: -1 if point1 invalid input: '<' point2, 1 if point1 > point2 or 0 in other case.