Class PolygonIndex
- java.lang.Object
-
- org.aksw.limes.core.measures.mapper.pointsets.PolygonIndex
-
- Direct Known Subclasses:
CentroidIndex
public class PolygonIndex extends Object
- Author:
- Axel-C. Ngonga Ngomo (ngonga@informatik.uni-leipzig.de)
-
-
Field Summary
Fields Modifier and Type Field Description intcomputationsMap<String,Map<Point,Map<Point,Double>>>distanceIndexMap<String,Polygon>polygonIndex
-
Constructor Summary
Constructors Constructor Description PolygonIndex()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetDistance(String uri, Point x, Point y)Returns the distances between two points x and y from the polygon with label uri Returns -1 if nothing is foundvoidindex(Set<Polygon> polygons)Indexes a list of polygons by mapping the uri of each polygon to the corresponding distanceIndexvoidindex(Polygon p)Indexes the distances between the points in a given polygon and adds polygon to list of indexesStringtoString()String representation of the polygon index
-
-
-
Method Detail
-
toString
public String toString()
String representation of the polygon index
-
index
public void index(Set<Polygon> polygons)
Indexes a list of polygons by mapping the uri of each polygon to the corresponding distanceIndex- Parameters:
polygons- to be indexed
-
index
public void index(Polygon p)
Indexes the distances between the points in a given polygon and adds polygon to list of indexes- Parameters:
p- Input polygon
-
getDistance
public double getDistance(String uri, Point x, Point y)
Returns the distances between two points x and y from the polygon with label uri Returns -1 if nothing is found- Parameters:
uri- Label of the polygonx- First point from the polygony- Second point from the polygon- Returns:
- Distance between x and y
-
-