Class ScanIndexedHausdorffMeasure
- java.lang.Object
-
- org.aksw.limes.core.measures.measure.AMeasure
-
- org.aksw.limes.core.measures.measure.pointsets.APointsetsMeasure
-
- org.aksw.limes.core.measures.measure.pointsets.hausdorff.IndexedHausdorffMeasure
-
- org.aksw.limes.core.measures.measure.pointsets.hausdorff.CentroidIndexedHausdorffMeasure
-
- org.aksw.limes.core.measures.measure.pointsets.hausdorff.ScanIndexedHausdorffMeasure
-
- All Implemented Interfaces:
IMeasure,IPointsetsMeasure
public class ScanIndexedHausdorffMeasure extends CentroidIndexedHausdorffMeasure
- Author:
- Axel-C. Ngonga Ngomo (ngonga@informatik.uni-leipzig.de)
-
-
Field Summary
-
Fields inherited from class org.aksw.limes.core.measures.measure.pointsets.hausdorff.CentroidIndexedHausdorffMeasure
ih, sourceIndex
-
Fields inherited from class org.aksw.limes.core.measures.measure.pointsets.hausdorff.IndexedHausdorffMeasure
nh, targetIndex
-
Fields inherited from class org.aksw.limes.core.measures.measure.pointsets.APointsetsMeasure
computations, USE_GREAT_ELLIPTIC_DISTANCE
-
-
Constructor Summary
Constructors Constructor Description ScanIndexedHausdorffMeasure()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckTermination(Polygon s, AMapping knownDistances, Map<Integer,List<Integer>> toCompute, double threshold)Checks whether a distance computation should be terminateddoublecomputeDistance(Polygon s, Polygon t, double threshold)booleancontains(Map<Integer,List<Integer>> map, int source, int target)Checks whether the map contains the pair (source, target)doublegetCurrentApproximation(int sourceIndex, AMapping knownDistances, Map<Integer,List<Integer>> toCompute, double threshold)Checks whether it is known for the source point with index sourceIndex that all distances to points in p are above the thresholdMap<Integer,List<Integer>>initToCompute(Polygon sPoly, Polygon tPoly, double threshold, AMapping knownDistances)Map<Integer,List<Integer>>updateToCompute(Polygon sPoly, Polygon tPoly, double threshold, AMapping knownDistances, Map<Integer,List<Integer>> toCompute)-
Methods inherited from class org.aksw.limes.core.measures.measure.pointsets.hausdorff.CentroidIndexedHausdorffMeasure
computeIndexes, run
-
Methods inherited from class org.aksw.limes.core.measures.measure.pointsets.hausdorff.IndexedHausdorffMeasure
getComputations, getInnerDistances, getName, getRuntimeApproximation, getSimilarity, getSimilarity, getType, runWithoutIndex
-
Methods inherited from class org.aksw.limes.core.measures.measure.pointsets.APointsetsMeasure
pointToPointDistance
-
-
-
-
Method Detail
-
computeDistance
public double computeDistance(Polygon s, Polygon t, double threshold)
- Specified by:
computeDistancein interfaceIPointsetsMeasure- Overrides:
computeDistancein classCentroidIndexedHausdorffMeasure
-
contains
public boolean contains(Map<Integer,List<Integer>> map, int source, int target)
Checks whether the map contains the pair (source, target)- Parameters:
map- indexsource- resourcetarget- resource- Returns:
- true if the map contains the pair (source, target)
-
getCurrentApproximation
public double getCurrentApproximation(int sourceIndex, AMapping knownDistances, Map<Integer,List<Integer>> toCompute, double threshold)Checks whether it is known for the source point with index sourceIndex that all distances to points in p are above the threshold- Parameters:
sourceIndex- indexknownDistances- MappingtoCompute- mapthreshold- of the distance- Returns:
- -1 if it is unknown, the known distance if it is known and (threshold + 1) if the distance is known to be beyond the threshold
-
checkTermination
public boolean checkTermination(Polygon s, AMapping knownDistances, Map<Integer,List<Integer>> toCompute, double threshold)
Checks whether a distance computation should be terminated- Parameters:
s- Source polygonknownDistances- MappingtoCompute- mapthreshold- of distance- Returns:
- true if computation should be terminated
-
initToCompute
public Map<Integer,List<Integer>> initToCompute(Polygon sPoly, Polygon tPoly, double threshold, AMapping knownDistances)
- Parameters:
sPoly- source polygonstPoly- target polygonsthreshold- of the distanceknownDistances- Mapping- Returns:
- distances that are still to be computed
-
updateToCompute
public Map<Integer,List<Integer>> updateToCompute(Polygon sPoly, Polygon tPoly, double threshold, AMapping knownDistances, Map<Integer,List<Integer>> toCompute)
- Parameters:
sPoly- source polygonstPoly- target polygonsthreshold- of the distanceknownDistances- mappingtoCompute- map- Returns:
- distances that are still to be computed
-
-