org.apache.lucene.util.bkd

## Class MutablePointsReaderUtils

- java.lang.Object
- - org.apache.lucene.util.bkd.MutablePointsReaderUtils

-     public final class MutablePointsReaderUtils
      extends Object

  Utility APIs for sorting and partitioning buffered points.
  NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `partition(int maxDoc, int splitDim, int bytesPerDim, int commonPrefixLen, MutablePointsReader reader, int from, int to, int mid, BytesRef scratch1, BytesRef scratch2)` Partition points around `mid`.
    `static void` | `sort(int maxDoc, int packedBytesLength, MutablePointsReader reader, int from, int to)` Sort the given `MutablePointsReader` based on its packed value then doc ID.
    `static void` | `sortByDim(int sortedDim, int bytesPerDim, int[] commonPrefixLengths, MutablePointsReader reader, int from, int to, BytesRef scratch1, BytesRef scratch2)` Sort points on the given dimension.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### sort

          public static void sort(int maxDoc,
                                  int packedBytesLength,
                                  MutablePointsReader reader,
                                  int from,
                                  int to)

      Sort the given `MutablePointsReader` based on its packed value then doc ID.

    - #### sortByDim

          public static void sortByDim(int sortedDim,
                                       int bytesPerDim,
                                       int[] commonPrefixLengths,
                                       MutablePointsReader reader,
                                       int from,
                                       int to,
                                       BytesRef scratch1,
                                       BytesRef scratch2)

      Sort points on the given dimension.

    - #### partition

          public static void partition(int maxDoc,
                                       int splitDim,
                                       int bytesPerDim,
                                       int commonPrefixLen,
                                       MutablePointsReader reader,
                                       int from,
                                       int to,
                                       int mid,
                                       BytesRef scratch1,
                                       BytesRef scratch2)

      Partition points around `mid`. 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.

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.