public class CycleDetector extends Object
Constructor and Description |
---|
CycleDetector() |
Modifier and Type | Method and Description |
---|---|
static List<String> |
hasCycle(DAG graph) |
static List<String> |
introducesCycle(Vertex vertex) |
static List<String> |
introducesCycle(Vertex vertex,
Map<Vertex,Integer> vertexStateMap)
This method will be called when an edge 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
|
public static List<String> introducesCycle(Vertex vertex, Map<Vertex,Integer> vertexStateMap)
vertex
- vertexStateMap
- Copyright © 2001-2013 Codehaus. All Rights Reserved.