Class DirectedCycleDetector

  • All Implemented Interfaces:
    GraphWalker

    public class DirectedCycleDetector
    extends CycleDetector
    Detects cycles in a directed graph. A directed topological iteration of the nodes of the graph is performed. If the iteration includes all nodes in the graph then the graph is cycle free, otherwise a cycle exists.
    Author:
    Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net
    See Also:
    DirectedBreadthFirstTopologicalIterator
    • Constructor Detail

      • DirectedCycleDetector

        public DirectedCycleDetector​(Graph graph)