Module org.apache.lucene.sandbox
Package org.apache.lucene.sandbox.search
Class NearestNeighbor.Cell
- java.lang.Object
-
- org.apache.lucene.sandbox.search.NearestNeighbor.Cell
-
- All Implemented Interfaces:
java.lang.Comparable<NearestNeighbor.Cell>
- Enclosing class:
- NearestNeighbor
static class NearestNeighbor.Cell extends java.lang.Object implements java.lang.Comparable<NearestNeighbor.Cell>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) double
distanceSortKey
The closest distance from a point in this cell to the query point, computed as a sort key throughSloppyMath.haversinSortKey(double, double, double, double)
.(package private) PointValues.PointTree
index
(package private) byte[]
maxPacked
(package private) byte[]
minPacked
(package private) int
readerIndex
-
Constructor Summary
Constructors Constructor Description Cell(PointValues.PointTree index, int readerIndex, byte[] minPacked, byte[] maxPacked, double distanceSortKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(NearestNeighbor.Cell other)
java.lang.String
toString()
-
-
-
Field Detail
-
readerIndex
final int readerIndex
-
minPacked
final byte[] minPacked
-
maxPacked
final byte[] maxPacked
-
index
final PointValues.PointTree index
-
distanceSortKey
final double distanceSortKey
The closest distance from a point in this cell to the query point, computed as a sort key throughSloppyMath.haversinSortKey(double, double, double, double)
. Note that this is an approximation to the closest distance, and there could be a point in the cell that is closer.
-
-
Constructor Detail
-
Cell
public Cell(PointValues.PointTree index, int readerIndex, byte[] minPacked, byte[] maxPacked, double distanceSortKey)
-
-
Method Detail
-
compareTo
public int compareTo(NearestNeighbor.Cell other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<NearestNeighbor.Cell>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-