Class EFGraph.EliasFanoSuccessorReader

java.lang.Object
it.unimi.dsi.big.webgraph.AbstractLazyLongIterator
it.unimi.dsi.big.webgraph.EFGraph.EliasFanoSuccessorReader
All Implemented Interfaces:
LazyLongIterator, LazyLongSkippableIterator
Enclosing class:
EFGraph

protected static final class EFGraph.EliasFanoSuccessorReader
extends AbstractLazyLongIterator
implements LazyLongSkippableIterator
  • Field Details

    • graph

      protected final LongBigList graph
      The underlying list.
    • skipPointers

      protected final EFGraph.LongWordBitReader skipPointers
      The longword bit reader for pointers.
    • skipPointersStart

      protected final long skipPointersStart
      The starting position of the pointers.
    • upperBitsStart

      protected final long upperBitsStart
      The starting position of the upper bits.
    • log2Quantum

      protected final int log2Quantum
      The logarithm of the quantum, cached from the graph.
    • quantum

      protected final int quantum
      The quantum, cached from the graph.
    • pointerSize

      protected final int pointerSize
      The size of a pointer.
    • outdegree

      protected final long outdegree
      The outdegree.
    • window

      protected long window
      The 64-bit window.
    • curr

      protected long curr
      The current word position in the list of upper bits.
    • currentIndex

      public long currentIndex
      The index of the current prefix sum.
  • Constructor Details

    • EliasFanoSuccessorReader

      public EliasFanoSuccessorReader​(long n, long upperBound, LongBigList graph, long outdegree, long skipPointersStart, int log2Quantum)
  • Method Details

    • nextLong

      public long nextLong()
      Description copied from interface: LazyLongIterator
      The next long returned by this iterator, or the special marker if this iterator is exhausted.
      Specified by:
      nextLong in interface LazyLongIterator
      Returns:
      next long returned by this iterator, or the special marker if this iterator is exhausted.
    • skipTo

      public long skipTo​(long lowerBound)
      Description copied from interface: LazyLongSkippableIterator
      Skips to a given element.

      Note that this interface is fragile: after LazyLongSkippableIterator.END_OF_LIST has been returned, the behavour of further calls to this method will be unpredictable.

      Specified by:
      skipTo in interface LazyLongSkippableIterator
      Parameters:
      lowerBound - a lower bound to the returned element.
      Returns:
      if the last returned element is greater than or equal to lowerBound, the last returned element; otherwise, the smallest element greater than or equal to lowerBound that would be returned by this iterator, or LazyLongSkippableIterator.END_OF_LIST if no such element exists.
    • toString

      public String toString()
      Overrides:
      toString in class Object