Package it.unimi.dsi.big.webgraph
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 Summary
Fields Modifier and Type Field Description protected longcurrThe current word position in the list of upper bits.longcurrentIndexThe index of the current prefix sum.protected it.unimi.dsi.fastutil.longs.LongBigListgraphThe underlying list.protected intlog2QuantumThe logarithm of the quantum, cached from the graph.protected longoutdegreeThe outdegree.protected intpointerSizeThe size of a pointer.protected intquantumThe quantum, cached from the graph.protected EFGraph.LongWordBitReaderskipPointersThe longword bit reader for pointers.protected longskipPointersStartThe starting position of the pointers.protected longupperBitsStartThe starting position of the upper bits.protected longwindowThe 64-bit window.-
Fields inherited from interface it.unimi.dsi.big.webgraph.LazyLongSkippableIterator
END_OF_LIST
-
-
Constructor Summary
Constructors Constructor Description EliasFanoSuccessorReader(long n, long upperBound, it.unimi.dsi.fastutil.longs.LongBigList graph, long outdegree, long skipPointersStart, int log2Quantum)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longnextLong()The next long returned by this iterator, or the special marker if this iterator is exhausted.longskipTo(long lowerBound)Skips to a given element.java.lang.StringtoString()-
Methods inherited from class it.unimi.dsi.big.webgraph.AbstractLazyLongIterator
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.big.webgraph.LazyLongIterator
skip
-
-
-
-
Field Detail
-
graph
protected final it.unimi.dsi.fastutil.longs.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.
-
-
Method Detail
-
nextLong
public long nextLong()
Description copied from interface:LazyLongIteratorThe next long returned by this iterator, or the special marker if this iterator is exhausted.- Specified by:
nextLongin interfaceLazyLongIterator- 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:LazyLongSkippableIteratorSkips to a given element.Note that this interface is fragile: after
LazyLongSkippableIterator.END_OF_LISThas been returned, the behavour of further calls to this method will be unpredictable.- Specified by:
skipToin interfaceLazyLongSkippableIterator- 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 tolowerBoundthat would be returned by this iterator, orLazyLongSkippableIterator.END_OF_LISTif no such element exists.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-