org.apache.commons.graph.contract
Class AcyclicContract.CycleDetector

java.lang.Object
  extended byorg.apache.commons.graph.contract.AcyclicContract.CycleDetector
All Implemented Interfaces:
Visitor
Enclosing class:
AcyclicContract

public class AcyclicContract.CycleDetector
extends java.lang.Object
implements Visitor

Description of the Class


Field Summary
private  DFS dfs
           
private  DirectedGraph graph
           
private  boolean isCyclic
           
 
Constructor Summary
AcyclicContract.CycleDetector(DirectedGraph graph)
          Constructor for the CycleDetector object
 
Method Summary
 void discoverEdge(Edge e)
          Description of the Method
 void discoverGraph(Graph graph)
          Description of the Method
 void discoverVertex(Vertex v)
          Description of the Method
 void finishEdge(Edge e)
          Description of the Method
 void finishGraph(Graph graph)
          Description of the Method
 void finishVertex(Vertex v)
          Description of the Method
 boolean hasCycle()
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dfs

private DFS dfs

isCyclic

private boolean isCyclic

graph

private DirectedGraph graph
Constructor Detail

AcyclicContract.CycleDetector

public AcyclicContract.CycleDetector(DirectedGraph graph)
Constructor for the CycleDetector object

Parameters:
graph -
Method Detail

discoverGraph

public void discoverGraph(Graph graph)
Description of the Method

Specified by:
discoverGraph in interface Visitor

discoverVertex

public void discoverVertex(Vertex v)
Description of the Method

Specified by:
discoverVertex in interface Visitor

discoverEdge

public void discoverEdge(Edge e)
Description of the Method

Specified by:
discoverEdge in interface Visitor

finishEdge

public void finishEdge(Edge e)
Description of the Method

Specified by:
finishEdge in interface Visitor

finishVertex

public void finishVertex(Vertex v)
Description of the Method

Specified by:
finishVertex in interface Visitor

finishGraph

public void finishGraph(Graph graph)
Description of the Method

Specified by:
finishGraph in interface Visitor

hasCycle

public boolean hasCycle()
Description of the Method