public class CycleDetector
extends java.lang.Object
Constructor and Description |
---|
CycleDetector() |
Modifier and Type | Method and Description |
---|---|
static java.util.List |
hasCycle(DAG graph) |
static java.util.List |
introducesCycle(Vertex vertex) |
static java.util.List |
introducesCycle(Vertex vertex,
java.util.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
|
public static java.util.List hasCycle(DAG graph)
public static java.util.List introducesCycle(Vertex vertex, java.util.Map vertexStateMap)
vertex
- vertexStateMap
- public static java.util.List introducesCycle(Vertex vertex)