org.codehaus.plexus.util.dag
Class CycleDetector
java.lang.Object
org.codehaus.plexus.util.dag.CycleDetector
public class CycleDetector
extends java.lang.Object
$Id: CycleDetector.java 1106 2004-10-07 19:29:57Z jdcasey $
private static boolean | dfsVisit(Vertex vertex, LinkedList cycle, Map vertexStateMap)
|
static List | hasCycle(DAG graph)
|
static List | introducesCycle(Vertex vertex)
|
static List | introducesCycle(Vertex vertex, Map vertexStateMap) - This method will be called when an egde leading to given vertex was added
and we want to check if introduction of this edge has not resulted
in apparition of cycle in the graph
|
private static boolean | isNotVisited(Vertex vertex, Map vertexStateMap)
|
private static boolean | isVisiting(Vertex vertex, Map vertexStateMap)
|
NOT_VISTITED
private static final Integer NOT_VISTITED
VISITED
private static final Integer VISITED
VISITING
private static final Integer VISITING
dfsVisit
private static boolean dfsVisit(Vertex vertex,
LinkedList cycle,
Map vertexStateMap)
hasCycle
public static List hasCycle(DAG graph)
introducesCycle
public static List introducesCycle(Vertex vertex)
introducesCycle
public static List introducesCycle(Vertex vertex,
Map vertexStateMap)
This method will be called when an egde leading to given vertex was added
and we want to check if introduction of this edge has not resulted
in apparition of cycle in the graph
vertex
- vertexStateMap
-
isNotVisited
private static boolean isNotVisited(Vertex vertex,
Map vertexStateMap)
vertex
- vertexStateMap
-
isVisiting
private static boolean isVisiting(Vertex vertex,
Map vertexStateMap)
vertex
- vertexStateMap
-