Class MonotonicBlockPackedReader

java.lang.Object
org.apache.lucene.util.LongValues
org.apache.lucene.util.packed.MonotonicBlockPackedReader
All Implemented Interfaces:
Accountable

public class MonotonicBlockPackedReader extends LongValues implements Accountable
Provides random access to a stream written with MonotonicBlockPackedWriter.
  • Field Details

    • BLOCK_SIZE

      private static final int BLOCK_SIZE
      See Also:
    • BLOCK_BITS

      private static final int BLOCK_BITS
      See Also:
    • MOD_MASK

      private static final int MOD_MASK
      See Also:
    • blockShift

      final int blockShift
    • blockMask

      final int blockMask
    • valueCount

      final long valueCount
    • minValues

      final long[] minValues
    • averages

      final float[] averages
    • subReaders

      final LongValues[] subReaders
    • sumBPV

      final long sumBPV
    • totalByteCount

      final long totalByteCount
  • Constructor Details

    • MonotonicBlockPackedReader

      private MonotonicBlockPackedReader(IndexInput in, int packedIntsVersion, int blockSize, long valueCount) throws IOException
      Throws:
      IOException
  • Method Details

    • expected

      static long expected(long origin, float average, int index)
    • of

      public static MonotonicBlockPackedReader of(IndexInput in, int packedIntsVersion, int blockSize, long valueCount) throws IOException
      Sole constructor.
      Throws:
      IOException
    • get

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

      public long size()
      Returns the number of values
    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object