Class CentroidIndex


  • public class CentroidIndex
    extends PolygonIndex
    Adds the distance from the centroids, which are in the middle of the longest axis. Also stores the radius of the smallest circle which contains the polygon entirely
    Author:
    Axel-C. Ngonga Ngomo (ngonga@informatik.uni-leipzig.de)
    • Constructor Detail

      • CentroidIndex

        public CentroidIndex()
    • Method Detail

      • distance

        public double distance​(Point x,
                               Point y)
        Parameters:
        x - Point x
        y - Point y
        Returns:
        Distance between x and y
      • index

        public void index​(Polygon p)
        Description copied from class: PolygonIndex
        Indexes the distances between the points in a given polygon and adds polygon to list of indexes
        Overrides:
        index in class PolygonIndex
        Parameters:
        p - Input polygon