Package org.codehaus.plexus.util.dag
Class CycleDetector
- java.lang.Object
-
- org.codehaus.plexus.util.dag.CycleDetector
-
public class CycleDetector extends java.lang.Object
- Author:
- Michal Maczka
-
-
Constructor Summary
Constructors Constructor Description CycleDetector()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.lang.String>
hasCycle(DAG graph)
static java.util.List<java.lang.String>
introducesCycle(Vertex vertex)
static java.util.List<java.lang.String>
introducesCycle(Vertex vertex, java.util.Map<Vertex,java.lang.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
-
-
-
Method Detail
-
hasCycle
public static java.util.List<java.lang.String> hasCycle(DAG graph)
-
introducesCycle
public static java.util.List<java.lang.String> introducesCycle(Vertex vertex, java.util.Map<Vertex,java.lang.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- Parameters:
vertex
- the vertexvertexStateMap
- the vertex Map- Returns:
- the found cycle
-
introducesCycle
public static java.util.List<java.lang.String> introducesCycle(Vertex vertex)
-
-