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
- Author:
- Sebastiano Vigna
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longThe current word position in the list of upper bits.longThe index of the current prefix sum.protected final it.unimi.dsi.fastutil.longs.LongBigListThe underlying list.protected final intThe logarithm of the quantum, cached from the graph.protected final longThe outdegree.protected final intThe size of a pointer.protected final intThe quantum, cached from the graph.protected final EFGraph.LongWordBitReaderThe longword bit reader for pointers.protected final longThe starting position of the pointers.protected final longThe starting position of the upper bits.protected longThe 64-bit window.Fields inherited from interface LazyLongSkippableIterator
END_OF_LIST -
Constructor Summary
ConstructorsConstructorDescriptionEliasFanoSuccessorReader(long n, long upperBound, it.unimi.dsi.fastutil.longs.LongBigList graph, long outdegree, long skipPointersStart, int log2Quantum) -
Method Summary
Methods inherited from class AbstractLazyLongIterator
skipMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface LazyLongIterator
skip
-
Field Details
-
graph
protected final it.unimi.dsi.fastutil.longs.LongBigList graphThe underlying list. -
skipPointers
The longword bit reader for pointers. -
skipPointersStart
protected final long skipPointersStartThe starting position of the pointers. -
upperBitsStart
protected final long upperBitsStartThe starting position of the upper bits. -
log2Quantum
protected final int log2QuantumThe logarithm of the quantum, cached from the graph. -
quantum
protected final int quantumThe quantum, cached from the graph. -
pointerSize
protected final int pointerSizeThe size of a pointer. -
outdegree
protected final long outdegreeThe outdegree. -
window
protected long windowThe 64-bit window. -
curr
protected long currThe current word position in the list of upper bits. -
currentIndex
public long currentIndexThe index of the current prefix sum.
-
-
Constructor Details
-
EliasFanoSuccessorReader
public EliasFanoSuccessorReader(long n, long upperBound, it.unimi.dsi.fastutil.longs.LongBigList graph, long outdegree, long skipPointersStart, int log2Quantum)
-
-
Method Details
-
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
-