org.geotools.graph.util.graph
Class DirectedCycleDetector

java.lang.Object
  extended byorg.geotools.graph.util.graph.CycleDetector
      extended byorg.geotools.graph.util.graph.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 Summary
DirectedCycleDetector(Graph graph)
           
 
Method Summary
protected  GraphIterator createIterator()
          Creates the iterator to be used in the cycle detection.
 
Methods inherited from class org.geotools.graph.util.graph.CycleDetector
containsCycle, finish, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectedCycleDetector

public DirectedCycleDetector(Graph graph)
Method Detail

createIterator

protected GraphIterator createIterator()
Description copied from class: CycleDetector
Creates the iterator to be used in the cycle detection.

Overrides:
createIterator in class CycleDetector
Returns:
a BreathFirstToplogicalIterator.


Copyright © GeoTools. All Rights Reserved.