Package org.apache.lucene.util.bkd
Class MutablePointsReaderUtils
java.lang.Object
org.apache.lucene.util.bkd.MutablePointsReaderUtils
Utility APIs for sorting and partitioning buffered points.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidpartition(BKDConfig config, int maxDoc, int splitDim, int commonPrefixLen, MutablePointValues reader, int from, int to, int mid, BytesRef scratch1, BytesRef scratch2) Partition points aroundmid.static voidsort(BKDConfig config, int maxDoc, MutablePointValues reader, int from, int to) Sort the givenMutablePointValuesbased on its packed value then doc ID.static voidsortByDim(BKDConfig config, int sortedDim, int[] commonPrefixLengths, MutablePointValues reader, int from, int to, BytesRef scratch1, BytesRef scratch2) Sort points on the given dimension.
-
Constructor Details
-
MutablePointsReaderUtils
MutablePointsReaderUtils()
-
-
Method Details
-
sort
Sort the givenMutablePointValuesbased on its packed value then doc ID. -
sortByDim
public static void sortByDim(BKDConfig config, int sortedDim, int[] commonPrefixLengths, MutablePointValues reader, int from, int to, BytesRef scratch1, BytesRef scratch2) Sort points on the given dimension. -
partition
public static void partition(BKDConfig config, int maxDoc, int splitDim, int commonPrefixLen, MutablePointValues reader, int from, int to, int mid, BytesRef scratch1, BytesRef scratch2) Partition points aroundmid. All values on the left must be less than or equal to it and all values on the right must be greater than or equal to it.
-