Package org.tinspin.index
Class BoxDistance.FarthestNeighbor
- java.lang.Object
-
- org.tinspin.index.BoxDistance.FarthestNeighbor
-
- All Implemented Interfaces:
BoxDistance
- Enclosing interface:
- BoxDistance
public static class BoxDistance.FarthestNeighbor extends Object implements BoxDistance
Special wrapper class which takes the inverse or the given function. Can be used to get the farthest neighbors using the nearest neighbor algorithm.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.tinspin.index.BoxDistance
BoxDistance.EdgeDistance, BoxDistance.FarthestNeighbor, BoxDistance.RectangleDist
-
-
Field Summary
-
Fields inherited from interface org.tinspin.index.BoxDistance
CENTER, EDGE
-
-
Constructor Summary
Constructors Constructor Description FarthestNeighbor(BoxDistance dist)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubledist(double[] center, double[] min, double[] max)doubledist(double[] center, Index.BoxEntry<?> entry)Some algorithm use this method on the entries containing user supplied values.
-
-
-
Constructor Detail
-
FarthestNeighbor
public FarthestNeighbor(BoxDistance dist)
-
-
Method Detail
-
dist
public double dist(double[] center, double[] min, double[] max)- Specified by:
distin interfaceBoxDistance- Parameters:
center- A pointmin- Minimum corner of axis aligned boxmax- Maximum corner of axis aligned box- Returns:
- Distance between point and box
-
dist
public double dist(double[] center, Index.BoxEntry<?> entry)Description copied from interface:BoxDistanceSome algorithm use this method on the entries containing user supplied values. This can be overridden if the min/max coordinates only represent the bounding-box of the object.If your entry is actually a sphere, a car, an human or a cat, you may need this.
- Specified by:
distin interfaceBoxDistance- Parameters:
center- a pointentry- a box- Returns:
- distance between point and box
-
-