Package org.apache.lucene.util.bkd
Class BKDReader.IndexTree
- java.lang.Object
-
- org.apache.lucene.util.bkd.BKDReader.IndexTree
-
- All Implemented Interfaces:
java.lang.Cloneable
- Enclosing class:
- BKDReader
public class BKDReader.IndexTree extends java.lang.Object implements java.lang.CloneableUsed to walk the off-heap index. The format takes advantage of the limited access pattern to the BKD tree at search time, i.e. starting at the root node and recursing downwards one child at a time.
-
-
Field Summary
Fields Modifier and Type Field Description private IndexInputinprivate long[]leafBlockFPStackprivate intlevelprivate boolean[]negativeDeltasprivate intnodeIDprivate int[]rightNodePositionsprivate BytesRefscratchprivate intsplitDimprivate int[]splitDimsprivate byte[][]splitPackedValueStackprivate byte[][]splitValuesStack
-
Constructor Summary
Constructors Modifier Constructor Description (package private)IndexTree()privateIndexTree(IndexInput in, int nodeID, int level)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BKDReader.IndexTreeclone()Clone, but you are not allowed to pop up past the point where the clone happened.longgetLeafBlockFP()Only valid after pushLeft or pushRight, not pop!intgetNodeID()intgetNumLeaves()Return the number of leaves below the current node.private intgetNumLeavesSlow(int node)intgetSplitDim()Only valid after pushLeft or pushRight, not pop!BytesRefgetSplitDimValue()Only valid after pushLeft or pushRight, not pop!byte[]getSplitPackedValue()booleanisLeafNode()booleannodeExists()voidpop()voidpushLeft()voidpushRight()private voidreadNodeData(boolean isLeft)
-
-
-
Field Detail
-
nodeID
private int nodeID
-
level
private int level
-
splitDim
private int splitDim
-
splitPackedValueStack
private final byte[][] splitPackedValueStack
-
in
private final IndexInput in
-
leafBlockFPStack
private final long[] leafBlockFPStack
-
rightNodePositions
private final int[] rightNodePositions
-
splitDims
private final int[] splitDims
-
negativeDeltas
private final boolean[] negativeDeltas
-
splitValuesStack
private final byte[][] splitValuesStack
-
scratch
private final BytesRef scratch
-
-
Constructor Detail
-
IndexTree
IndexTree()
-
IndexTree
private IndexTree(IndexInput in, int nodeID, int level)
-
-
Method Detail
-
pushLeft
public void pushLeft()
-
clone
public BKDReader.IndexTree clone()
Clone, but you are not allowed to pop up past the point where the clone happened.- Overrides:
clonein classjava.lang.Object
-
pushRight
public void pushRight()
-
pop
public void pop()
-
isLeafNode
public boolean isLeafNode()
-
nodeExists
public boolean nodeExists()
-
getNodeID
public int getNodeID()
-
getSplitPackedValue
public byte[] getSplitPackedValue()
-
getSplitDim
public int getSplitDim()
Only valid after pushLeft or pushRight, not pop!
-
getSplitDimValue
public BytesRef getSplitDimValue()
Only valid after pushLeft or pushRight, not pop!
-
getLeafBlockFP
public long getLeafBlockFP()
Only valid after pushLeft or pushRight, not pop!
-
getNumLeaves
public int getNumLeaves()
Return the number of leaves below the current node.
-
getNumLeavesSlow
private int getNumLeavesSlow(int node)
-
readNodeData
private void readNodeData(boolean isLeft)
-
-