Class EFGraph.EliasFanoSuccessorReader

java.lang.Object
it.unimi.dsi.webgraph.AbstractLazyIntIterator
it.unimi.dsi.webgraph.EFGraph.EliasFanoSuccessorReader
All Implemented Interfaces:
LazyIntIterator, LazyIntSkippableIterator
Enclosing class:
EFGraph

protected static final class EFGraph.EliasFanoSuccessorReader
extends AbstractLazyIntIterator
implements LazyIntSkippableIterator
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected long curr
    The current word position in the list of upper bits.
    long currentIndex
    The index of the current prefix sum.
    protected LongBigList graph
    The underlying list.
    protected int log2Quantum
    The logarithm of the quantum, cached from the graph.
    protected long outdegree
    The outdegree.
    protected int pointerSize
    The size of a pointer.
    protected int quantum
    The quantum, cached from the graph.
    protected EFGraph.LongWordBitReader skipPointers
    The longword bit reader for pointers.
    protected long skipPointersStart
    The starting position of the pointers.
    protected long upperBitsStart
    The starting position of the upper bits.
    protected long window
    The 64-bit window.

    Fields inherited from interface it.unimi.dsi.webgraph.LazyIntSkippableIterator

    END_OF_LIST
  • Constructor Summary

    Constructors 
    Constructor Description
    EliasFanoSuccessorReader​(long n, int upperBound, LongBigList graph, long outdegree, long skipPointersStart, int log2Quantum)  
  • Method Summary

    Modifier and Type Method Description
    int nextInt()
    The next integer returned by this iterator, or the special marker if this iterator is exhausted.
    int skipTo​(int lowerBound)
    Skips to a given element.
    java.lang.String toString()  

    Methods inherited from class it.unimi.dsi.webgraph.AbstractLazyIntIterator

    skip

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface it.unimi.dsi.webgraph.LazyIntIterator

    skip
  • 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

  • Method Details

    • nextInt

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

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

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

      Specified by:
      skipTo in interface LazyIntSkippableIterator
      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 LazyIntSkippableIterator.END_OF_LIST if no such element exists.
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object