Class AbstractSuccinctDirectedGraph.CumulativeSuccessors<E>

java.lang.Object
org.jgrapht.sux4j.AbstractSuccinctDirectedGraph.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:
AbstractSuccinctDirectedGraph<E>

protected static final class AbstractSuccinctDirectedGraph.CumulativeSuccessors<E> extends Object implements it.unimi.dsi.fastutil.longs.LongIterator
Turns all edges x → y into a monotone sequence using the encoding x2⌈log n + y, or the encoding xn + y - e, where e is the index of the edge in lexicographical order, depending on the value of the strict parameter.
  • Field Details

    • graph

      private final Graph<Integer,E> graph
    • n

      private final long n
    • sourceShift

      private final int sourceShift
    • succ

      private final Function<Integer,Iterable<E>> succ
    • strict

      private final boolean strict
    • 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

  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<E>
    • nextLong

      public long nextLong()
      Specified by:
      nextLong in interface it.unimi.dsi.fastutil.longs.LongIterator
      Specified by:
      nextLong in interface PrimitiveIterator.OfLong