Class TopologicalOrderIterator<V,​E extends DefaultEdge>

  • Type Parameters:
    V - Vertex type
    E - Edge type
    All Implemented Interfaces:

    public class TopologicalOrderIterator<V,​E extends DefaultEdge>
    extends java.lang.Object
    implements java.util.Iterator<V>
    Iterates over the edges of a graph in topological order.
    • Constructor Detail

      • TopologicalOrderIterator

        public TopologicalOrderIterator​(DirectedGraph<V,​E> graph)
    • Method Detail

      • populate

        private void populate​(java.util.Map<V,​int[]> countMap,
                              java.util.List<V> empties)
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<V>
      • next

        public V next()
        Specified by:
        next in interface java.util.Iterator<V>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<V>
      • findCycles

        java.util.Set<V> findCycles()