Class EliasFanoMonotoneBigLongBigList

All Implemented Interfaces:
BigList<Long>, LongBigList, LongCollection, LongIterable, LongStack, Size64, Stack<Long>, Serializable, Comparable<BigList<? extends Long>>, Iterable<Long>, Collection<Long>

public class EliasFanoMonotoneBigLongBigList extends AbstractLongBigList implements Serializable
An implementation of Elias–Fano's representation of monotone sequences identical to EliasFanoMonotoneLongBigList, but slightly slower and without size limitations.

Instances of this class can be memory mapped using MappedEliasFanoMonotoneLongBigList.

See Also:
  • Field Details

    • length

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

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

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

      protected long[][] lowerBits
      The list of lower bits of each element, stored explicitly in a big array.
    • 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

    • EliasFanoMonotoneBigLongBigList

      protected EliasFanoMonotoneBigLongBigList(long length, int l, long[][] upperBits, long[][] lowerBits, SimpleBigSelect selectUpper)
    • EliasFanoMonotoneBigLongBigList

      public EliasFanoMonotoneBigLongBigList(IntIterable list)
      Creates an Elias–Fano representation of the values returned by the given iterable object.
      Parameters:
      list - an iterable object returning nondecreasing natural numbers.
    • EliasFanoMonotoneBigLongBigList

      public EliasFanoMonotoneBigLongBigList(ShortIterable list)
      Creates an Elias–Fano representation of the values returned by the given iterable object.
      Parameters:
      list - an iterable object returning nondecreasing natural numbers.
    • EliasFanoMonotoneBigLongBigList

      public EliasFanoMonotoneBigLongBigList(ByteIterable list)
      Creates an Elias–Fano representation of the values returned by the given iterable object.
      Parameters:
      list - an iterable object returning nondecreasing natural numbers.
    • EliasFanoMonotoneBigLongBigList

      public EliasFanoMonotoneBigLongBigList(LongIterable list)
      Creates an Elias–Fano representation of the values returned by the given iterable object.
      Parameters:
      list - an iterable object returning nondecreasing natural numbers.
    • EliasFanoMonotoneBigLongBigList

      public EliasFanoMonotoneBigLongBigList(long n, long upperBound, ByteIterator iterator)
      Creates an Elias–Fano representation of the values returned by an iterator, given that the overall number of elements and an upper bound are provided, too.

      This constructor is particularly useful if the elements of the iterator are provided by some sequential source.

      Parameters:
      n - the number of elements returned by iterator.
      upperBound - a strict upper bound to the values returned by iterator (note that it used to be non-strict).
      iterator - an iterator returning nondecreasing natural numbers.
    • EliasFanoMonotoneBigLongBigList

      public EliasFanoMonotoneBigLongBigList(long n, long upperBound, ShortIterator iterator)
      Creates an Elias–Fano representation of the values returned by an iterator, given that the overall number of elements and an upper bound are provided, too.

      This constructor is particularly useful if the elements of the iterator are provided by some sequential source.

      Parameters:
      n - the number of elements returned by iterator.
      upperBound - a strict upper bound to the values returned by iterator (note that it used to be non-strict).
      iterator - an iterator returning nondecreasing natural numbers.
    • EliasFanoMonotoneBigLongBigList

      public EliasFanoMonotoneBigLongBigList(long n, long upperBound, IntIterator iterator)
      Creates an Elias–Fano representation of the values returned by an iterator, given that the overall number of elements and an upper bound are provided, too.

      This constructor is particularly useful if the elements of the iterator are provided by some sequential source.

      Parameters:
      n - the number of elements returned by iterator.
      upperBound - a strict upper bound to the values returned by iterator (note that it used to be non-strict).
      iterator - an iterator returning nondecreasing natural numbers.
    • EliasFanoMonotoneBigLongBigList

      public EliasFanoMonotoneBigLongBigList(long n, long upperBound, LongIterator iterator)
      Creates an Elias–Fano representation of the values returned by an iterator, given that the overall number of elements and an upper bound are provided, too.

      This constructor is particularly useful if the elements of the iterator are provided by some sequential source.

      Parameters:
      n - the number of elements returned by iterator.
      upperBound - a strict upper bound to the values returned by iterator (note that it used to be non-strict).
      iterator - an iterator returning nondecreasing natural numbers.
    • EliasFanoMonotoneBigLongBigList

      protected EliasFanoMonotoneBigLongBigList(long[] a, LongIterator iterator)
      Creates an Elias–Fano representation of the values returned by an iterator, given that the overall number of elements and an upper bound are provided, too.

      This constructor is used only internally, to work around the usual problems caused by the obligation to call this() before anything else.

      Parameters:
      a - an array containing the number of elements returned by iterator and a strict upper bound to the values returned by iterator (note that it used to be non-strict).
      iterator - an iterator returning nondecreasing natural numbers.
  • Method Details