Package ghidra.graph.algo
Class JohnsonCircuitsAlgorithm<V,E extends GEdge<V>>
- java.lang.Object
-
- ghidra.graph.algo.JohnsonCircuitsAlgorithm<V,E>
-
- Type Parameters:
V
- the vertex typeE
- the edge type
public class JohnsonCircuitsAlgorithm<V,E extends GEdge<V>> extends java.lang.Object
Finds all circuits (loops) in the given graph.Warning: This is a recursive algorithm. As such, it is limited in how deep it can recurse. Any path that exceeds the
JAVA_STACK_DEPTH_LIMIT
will not be found.
-
-
Field Summary
Fields Modifier and Type Field Description static int
JAVA_STACK_DEPTH_LIMIT
-
Constructor Summary
Constructors Constructor Description JohnsonCircuitsAlgorithm(GDirectedGraph<V,E> g, Accumulator<java.util.List<V>> accumulator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
compute(boolean uniqueCircuits, TaskMonitor monitor)
Finds the circuits in the graph passed at construction time.
-
-
-
Field Detail
-
JAVA_STACK_DEPTH_LIMIT
public static final int JAVA_STACK_DEPTH_LIMIT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JohnsonCircuitsAlgorithm
public JohnsonCircuitsAlgorithm(GDirectedGraph<V,E> g, Accumulator<java.util.List<V>> accumulator)
-
-
Method Detail
-
compute
public void compute(boolean uniqueCircuits, TaskMonitor monitor) throws CancelledException
Finds the circuits in the graph passed at construction time.- Parameters:
uniqueCircuits
- true signals to return only unique circuits, where no two circuits will contain the same vertexmonitor
- the task monitor- Throws:
CancelledException
- if the monitor is cancelled
-
-