Class JohnsonCircuitsAlgorithm<V,E extends GEdge<V>>

java.lang.Object
ghidra.graph.algo.JohnsonCircuitsAlgorithm<V,E>
Type Parameters:
V - the vertex type
E - the edge type

public class JohnsonCircuitsAlgorithm<V,E extends GEdge<V>> extends 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 Details

    • JAVA_STACK_DEPTH_LIMIT

      public static final int JAVA_STACK_DEPTH_LIMIT
      See Also:
  • Constructor Details

  • Method Details

    • 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 vertex
      monitor - the task monitor
      Throws:
      CancelledException - if the monitor is cancelled