Class DirectMonotonicReader

    • Field Detail

      • BASE_RAM_BYTES_USED

        private static final long BASE_RAM_BYTES_USED
      • blockShift

        private final int blockShift
      • blockMask

        private final long blockMask
      • mins

        private final long[] mins
      • avgs

        private final float[] avgs
      • bpvs

        private final byte[] bpvs
      • nonZeroBpvs

        private final int nonZeroBpvs
    • Constructor Detail

      • DirectMonotonicReader

        private DirectMonotonicReader​(int blockShift,
                                      LongValues[] readers,
                                      long[] mins,
                                      float[] avgs,
                                      byte[] bpvs)
    • Method Detail

      • get

        public long get​(long index)
        Description copied from class: LongValues
        Get value at index.
        Specified by:
        get in class LongValues
      • getBounds

        private long[] getBounds​(long index)
        Get lower/upper bounds for the value at a given index without hitting the direct reader.
      • binarySearch

        public long binarySearch​(long fromIndex,
                                 long toIndex,
                                 long key)
        Return the index of a key if it exists, or its insertion point otherwise like Arrays.binarySearch(long[], int, int, long).
        See Also:
        Arrays.binarySearch(long[], int, int, long)
      • ramBytesUsed

        public long ramBytesUsed()
        Description copied from interface: Accountable
        Return the memory usage of this object in bytes. Negative values are illegal.
        Specified by:
        ramBytesUsed in interface Accountable