Class Packed64SingleBlock

All Implemented Interfaces:
Accountable
Direct Known Subclasses:
Packed64SingleBlock.Packed64SingleBlock1, Packed64SingleBlock.Packed64SingleBlock10, Packed64SingleBlock.Packed64SingleBlock12, Packed64SingleBlock.Packed64SingleBlock16, Packed64SingleBlock.Packed64SingleBlock2, Packed64SingleBlock.Packed64SingleBlock21, Packed64SingleBlock.Packed64SingleBlock3, Packed64SingleBlock.Packed64SingleBlock32, Packed64SingleBlock.Packed64SingleBlock4, Packed64SingleBlock.Packed64SingleBlock5, Packed64SingleBlock.Packed64SingleBlock6, Packed64SingleBlock.Packed64SingleBlock7, Packed64SingleBlock.Packed64SingleBlock8, Packed64SingleBlock.Packed64SingleBlock9

abstract class Packed64SingleBlock extends PackedInts.MutableImpl
This class is similar to Packed64 except that it trades space for speed by ensuring that a single block needs to be read/written in order to read/write a value.
  • Field Details

    • MAX_SUPPORTED_BITS_PER_VALUE

      public static final int MAX_SUPPORTED_BITS_PER_VALUE
      See Also:
    • SUPPORTED_BITS_PER_VALUE

      private static final int[] SUPPORTED_BITS_PER_VALUE
    • blocks

      final long[] blocks
  • Constructor Details

    • Packed64SingleBlock

      Packed64SingleBlock(int valueCount, int bitsPerValue)
  • Method Details

    • isSupported

      public static boolean isSupported(int bitsPerValue)
    • requiredCapacity

      private static int requiredCapacity(int valueCount, int valuesPerBlock)
    • clear

      public void clear()
      Description copied from class: PackedInts.Mutable
      Sets all values to 0.
      Overrides:
      clear in class PackedInts.Mutable
    • ramBytesUsed

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

      public int get(int index, long[] arr, int off, int len)
      Description copied from class: PackedInts.Reader
      Bulk get: read at least one and at most len longs starting from index into arr[off:off+len] and return the actual number of values that have been read.
      Overrides:
      get in class PackedInts.Reader
    • set

      public int set(int index, long[] arr, int off, int len)
      Description copied from class: PackedInts.Mutable
      Bulk set: set at least one and at most len longs starting at off in arr into this mutable, starting at index. Returns the actual number of values that have been set.
      Overrides:
      set in class PackedInts.Mutable
    • fill

      public void fill(int fromIndex, int toIndex, long val)
      Description copied from class: PackedInts.Mutable
      Fill the mutable from fromIndex (inclusive) to toIndex (exclusive) with val.
      Overrides:
      fill in class PackedInts.Mutable
    • toString

      public String toString()
      Overrides:
      toString in class PackedInts.MutableImpl
    • create

      public static Packed64SingleBlock create(int valueCount, int bitsPerValue)