Package org.tinspin.index
Class RectangleDistanceFunction.RectangleDist
- java.lang.Object
-
- org.tinspin.index.RectangleDistanceFunction.RectangleDist
-
- All Implemented Interfaces:
RectangleDistanceFunction
- Enclosing interface:
- RectangleDistanceFunction
public static class RectangleDistanceFunction.RectangleDist extends Object implements RectangleDistanceFunction
This class calculates the distance to a rectangular shaped object. This class completely ignores the center given as parameter to the interface. TODO: maybe we could get rid of the center parameter altogether and always let the RectangleDistanceFunction hold it's reference points?
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.tinspin.index.RectangleDistanceFunction
RectangleDistanceFunction.EdgeDistance, RectangleDistanceFunction.FarthestNeighbor, RectangleDistanceFunction.RectangleDist
-
-
Field Summary
-
Fields inherited from interface org.tinspin.index.RectangleDistanceFunction
CENTER, EDGE
-
-
Constructor Summary
Constructors Constructor Description RectangleDist(double[] lower, double[] upper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubledist(double[] ignored, double[] min, double[] max)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.tinspin.index.RectangleDistanceFunction
dist
-
-
-
-
Method Detail
-
dist
public double dist(double[] ignored, double[] min, double[] max)- Specified by:
distin interfaceRectangleDistanceFunction- Parameters:
ignored- A pointmin- Minimum corner of axis aligned boxmax- Maximum corner of axis aligned box- Returns:
- Distance between point and box
-
-