Class SlowDFSFinishTimeIterator<T>

  • All Implemented Interfaces:
    Serializable, Cloneable, Iterable<T>, Collection<T>, Iterator<T>, List<T>, RandomAccess

    public class SlowDFSFinishTimeIterator<T>
    extends DFSFinishTimeIterator<T>
    This class implements depth-first search over a Graph, return an enumeration of the nodes of the graph in order of increasing finishing time. This class follows the outNodes of the graph nodes to define the graph, but this behavior can be changed by overriding the getConnected method.
    See Also:
    Serialized Form
    • Constructor Detail

      • SlowDFSFinishTimeIterator

        public SlowDFSFinishTimeIterator​(Graph<T> G,
                                         T N)
                                  throws IllegalArgumentException
        Construct a depth-first enumerator starting with a particular node in a directed graph.
        Parameters:
        G - the graph whose nodes to enumerate
        Throws:
        IllegalArgumentException - if G is null
      • SlowDFSFinishTimeIterator

        public SlowDFSFinishTimeIterator​(Graph<T> G,
                                         Iterator<? extends T> nodes)
        Construct a depth-first enumerator across the (possibly improper) subset of nodes reachable from the nodes in the given enumeration.
        Parameters:
        G - the graph whose nodes to enumerate
        nodes - the set of nodes from which to start searching