Class AbstractSuccinctUndirectedGraph.CumulativeSuccessors<E>
java.lang.Object
org.jgrapht.sux4j.AbstractSuccinctUndirectedGraph.CumulativeSuccessors<E>
- Type Parameters:
E- the graph edge type
- All Implemented Interfaces:
it.unimi.dsi.fastutil.longs.LongIterator, Iterator<Long>, PrimitiveIterator<Long, LongConsumer>, PrimitiveIterator.OfLong
- Enclosing class:
AbstractSuccinctUndirectedGraph<E>
protected static final class AbstractSuccinctUndirectedGraph.CumulativeSuccessors<E>
extends Object
implements it.unimi.dsi.fastutil.longs.LongIterator
Turns all edges x — y,
x ≤ y, into a monotone sequence using the encoding
x2⌈log n⌉ + y, or all edges
x — y, x ≥ y, using
the encoding xn + y - e, where e is
the index of the edge in lexicographical order, depending on the value of the
sorted
parameter.-
Nested Class Summary
Nested classes/interfaces inherited from interface PrimitiveIterator
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface it.unimi.dsi.fastutil.longs.LongIterator
forEachRemaining, forEachRemaining, next, skipMethods inherited from interface PrimitiveIterator.OfLong
forEachRemaining
-
Field Details
-
graph
-
n
private final long n -
sourceShift
private final int sourceShift -
succ
-
sorted
private final boolean sorted -
x
private int x -
d
private int d -
i
private int i -
e
private int e -
next
private long next -
s
private int[] s
-
-
Constructor Details
-
CumulativeSuccessors
-
-
Method Details
-
hasNext
-
nextLong
public long nextLong()- Specified by:
nextLongin interfaceit.unimi.dsi.fastutil.longs.LongIterator- Specified by:
nextLongin interfacePrimitiveIterator.OfLong
-