private static class FloatPointNearestNeighbor.NearestVisitor extends java.lang.Object implements PointValues.IntersectVisitor
Modifier and Type | Field and Description |
---|---|
(package private) int |
curDocBase |
(package private) Bits |
curLiveDocs |
private int |
dims |
(package private) java.util.PriorityQueue<FloatPointNearestNeighbor.NearestHit> |
hitQueue |
private static int |
MANTISSA_BITS |
private float[] |
max |
private float[] |
min |
(package private) float[] |
origin |
(package private) int |
topN |
private int |
updateMinMaxCounter |
Constructor and Description |
---|
NearestVisitor(java.util.PriorityQueue<FloatPointNearestNeighbor.NearestHit> hitQueue,
int topN,
float[] origin) |
Modifier and Type | Method and Description |
---|---|
PointValues.Relation |
compare(byte[] minPackedValue,
byte[] maxPackedValue)
Called for non-leaf cells to test how the cell relates to the query, to
determine how to further recurse down the tree.
|
private float |
getMinDelta(float distance)
Returns the minimum value that will change the given distance when added to it.
|
private void |
maybeUpdateMinMax() |
void |
visit(int docID)
Called for all documents in a leaf cell that's fully contained by the query.
|
void |
visit(int docID,
byte[] packedValue)
Called for all documents in a leaf cell that crosses the query.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
grow
int curDocBase
Bits curLiveDocs
final int topN
final java.util.PriorityQueue<FloatPointNearestNeighbor.NearestHit> hitQueue
final float[] origin
private int dims
private int updateMinMaxCounter
private float[] min
private float[] max
private static final int MANTISSA_BITS
public NearestVisitor(java.util.PriorityQueue<FloatPointNearestNeighbor.NearestHit> hitQueue, int topN, float[] origin)
public void visit(int docID)
PointValues.IntersectVisitor
visit
in interface PointValues.IntersectVisitor
private float getMinDelta(float distance)
private void maybeUpdateMinMax()
public void visit(int docID, byte[] packedValue)
PointValues.IntersectVisitor
visit
in interface PointValues.IntersectVisitor
public PointValues.Relation compare(byte[] minPackedValue, byte[] maxPackedValue)
PointValues.IntersectVisitor
compare
in interface PointValues.IntersectVisitor