Class EliasFanoMonotoneBigLongBigList

java.lang.Object
java.util.AbstractCollection<Long>
it.unimi.dsi.fastutil.longs.AbstractLongCollection
it.unimi.dsi.fastutil.longs.AbstractLongBigList
it.unimi.dsi.sux4j.util.EliasFanoMonotoneBigLongBigList
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>, Serializable, Comparable<it.unimi.dsi.fastutil.BigList<? extends Long>>, Iterable<Long>, Collection<Long>

public class EliasFanoMonotoneBigLongBigList extends it.unimi.dsi.fastutil.longs.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:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    class 
    A list iterator over the values of this EliasFanoMonotoneBigLongBigList.

    Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.longs.AbstractLongBigList

    it.unimi.dsi.fastutil.longs.AbstractLongBigList.LongRandomAccessSubList, it.unimi.dsi.fastutil.longs.AbstractLongBigList.LongSubList
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final int
    The number of lower bits.
    protected final long
    The length of the sequence.
    protected long[][]
    The list of lower bits of each element, stored explicitly in a big array.
    protected final long
    The mask for the lower bits.
    protected final SimpleBigSelect
    The select structure used to extract the upper bits.
    protected long[][]
    The upper bits, stored as unary gaps.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    EliasFanoMonotoneBigLongBigList(long[] a, it.unimi.dsi.fastutil.longs.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.
    protected
    EliasFanoMonotoneBigLongBigList(long length, int l, long[][] upperBits, long[][] lowerBits, SimpleBigSelect selectUpper)
     
     
    EliasFanoMonotoneBigLongBigList(long n, long upperBound, it.unimi.dsi.fastutil.bytes.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.
     
    EliasFanoMonotoneBigLongBigList(long n, long upperBound, it.unimi.dsi.fastutil.ints.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.
     
    EliasFanoMonotoneBigLongBigList(long n, long upperBound, it.unimi.dsi.fastutil.longs.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.
     
    EliasFanoMonotoneBigLongBigList(long n, long upperBound, it.unimi.dsi.fastutil.shorts.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.
     
    EliasFanoMonotoneBigLongBigList(it.unimi.dsi.fastutil.bytes.ByteIterable list)
    Creates an Elias–Fano representation of the values returned by the given iterable object.
     
    EliasFanoMonotoneBigLongBigList(it.unimi.dsi.fastutil.ints.IntIterable list)
    Creates an Elias–Fano representation of the values returned by the given iterable object.
     
    EliasFanoMonotoneBigLongBigList(it.unimi.dsi.fastutil.longs.LongIterable list)
    Creates an Elias–Fano representation of the values returned by the given iterable object.
     
    EliasFanoMonotoneBigLongBigList(it.unimi.dsi.fastutil.shorts.ShortIterable list)
    Creates an Elias–Fano representation of the values returned by the given iterable object.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    dump(String basename)
    Dumps this list's lower bits in native order so that it can be used with MappedEliasFanoMonotoneLongBigList.
    void
    dump(String basename, ByteOrder byteOrder)
    Dumps this list's lower bits so that it can be used with MappedEliasFanoMonotoneLongBigList.
    long[]
    get(long index, long[] dest)
    Extracts a number of consecutive entries into a given array.
    long[]
    get(long index, long[] dest, int offset, int length)
    Extracts a number of consecutive entries into a given array fragment.
    long
    getDelta(long index)
    Returns the difference between two consecutive elements of the sequence.
    long
    getLong(long index)
    Returns the element at the specified position.
    Returns a list iterator over the values of this EliasFanoMonotoneBigLongBigList.
    Returns a list iterator over the values of this EliasFanoMonotoneBigLongBigList.
    listIterator(long from)
    Returns a list iterator over the values of this EliasFanoMonotoneBigLongBigList.
    long
     
    long
     

    Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongBigList

    add, add, add, addAll, addAll, addAll, addAll, addElements, addElements, clear, compareTo, contains, ensureIndex, ensureRestrictedIndex, equals, forEach, get, getElements, hashCode, indexOf, indexOf, lastIndexOf, lastIndexOf, peek, peekLong, pop, popLong, push, push, rem, remove, removeElements, removeLong, set, set, setElements, size, size, subList, top, topLong, toString

    Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongCollection

    add, contains, containsAll, containsAll, forEach, remove, removeAll, removeAll, removeIf, retainAll, retainAll, toArray, toLongArray, toLongArray

    Methods inherited from class java.util.AbstractCollection

    isEmpty, toArray, toArray

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.util.Collection

    containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toArray

    Methods inherited from interface it.unimi.dsi.fastutil.longs.LongBigList

    addAll, addAll, addAll, addAll, getElements, setElements, setElements, spliterator

    Methods inherited from interface it.unimi.dsi.fastutil.longs.LongCollection

    add, contains, containsAll, longIterator, longParallelStream, longSpliterator, longStream, parallelStream, remove, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toLongArray, toLongArray

    Methods inherited from interface it.unimi.dsi.fastutil.longs.LongIterable

    forEach, forEach

    Methods inherited from interface it.unimi.dsi.fastutil.Stack

    isEmpty
  • 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(it.unimi.dsi.fastutil.ints.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(it.unimi.dsi.fastutil.shorts.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(it.unimi.dsi.fastutil.bytes.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(it.unimi.dsi.fastutil.longs.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, it.unimi.dsi.fastutil.bytes.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, it.unimi.dsi.fastutil.shorts.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, it.unimi.dsi.fastutil.ints.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, it.unimi.dsi.fastutil.longs.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, it.unimi.dsi.fastutil.longs.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