Class MappedEliasFanoMonotoneLongBigList

java.lang.Object
java.util.AbstractCollection<Long>
it.unimi.dsi.fastutil.longs.AbstractLongCollection
it.unimi.dsi.fastutil.longs.AbstractLongBigList
it.unimi.dsi.sux4j.util.MappedEliasFanoMonotoneLongBigList
All Implemented Interfaces:
it.unimi.dsi.fastutil.BigList<Long>, it.unimi.dsi.fastutil.longs.LongBigList, it.unimi.dsi.fastutil.longs.LongCollection, it.unimi.dsi.fastutil.longs.LongIterable, it.unimi.dsi.fastutil.longs.LongStack, it.unimi.dsi.fastutil.Size64, it.unimi.dsi.fastutil.Stack<Long>, it.unimi.dsi.lang.FlyweightPrototype<MappedEliasFanoMonotoneLongBigList>, Closeable, Serializable, AutoCloseable, Comparable<it.unimi.dsi.fastutil.BigList<? extends Long>>, Iterable<Long>, Collection<Long>

public class MappedEliasFanoMonotoneLongBigList extends it.unimi.dsi.fastutil.longs.AbstractLongBigList implements Serializable, Closeable, it.unimi.dsi.lang.FlyweightPrototype<MappedEliasFanoMonotoneLongBigList>
A memory-mapped implementation of EliasFanoMonotoneLongBigList/EliasFanoMonotoneBigLongBigList.

This class makes it possible to use an EliasFanoMonotoneLongBigList (or EliasFanoMonotoneBigLongBigList) without actually loading the lower bits, but rather mapping them into memory. You build an EliasFanoMonotoneLongBigList (or EliasFanoMonotoneBigLongBigList) instance first, and then you use the dump it to disk providing a basename. The same basename must be used when loading an instance of this class.

After usage, you should close() instances of this class to release the associated FileChannel.

Instances of this class are not thread safe, but the copy() method provides a lightweight duplicate that can be read independently by another thread. The method uses LongMappedBigList.copy() to provide an independent mapping of the lower bits. Note that the close() method, when invoked on any copy, will stop mapping of all copies. *

See Also:
  • Field Details

    • OBJECT_EXTENSION

      public static final String OBJECT_EXTENSION
      See Also:
    • LOWER_BITS_EXTENSION

      public static final String LOWER_BITS_EXTENSION
      See Also:
    • length

      protected final long length
      The length of the sequence.
    • l

      protected final int l
      The number of lower bits.
    • upperBits

      protected long[][] upperBits
      The upper bits, stored as unary gaps.
    • lowerBits

      protected it.unimi.dsi.fastutil.longs.LongMappedBigList lowerBits
      The list of lower bits of each element, stored explicitly.
    • selectUpper

      protected final SimpleBigSelect selectUpper
      The select structure used to extract the upper bits.
    • lowerBitsMask

      protected final long lowerBitsMask
      The mask for the lower bits.
  • Constructor Details

    • MappedEliasFanoMonotoneLongBigList

      protected MappedEliasFanoMonotoneLongBigList(long length, int l, long[][] upperBits, SimpleBigSelect selectUpper, boolean littleEndian)
  • Method Details