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

  • Type Parameters:
    V - the vertex type
    E - 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 Detail

    • Constructor Detail

    • Method Detail

      • compute

        public void compute​(boolean uniqueCircuits,
                            TaskMonitor monitor)
                     throws CancelledException
        Finds the circuits in the graph passed at construction time.
        uniqueCircuits - true signals to return only unique circuits, where no two circuits will contain the same vertex
        monitor - the task monitor
        CancelledException - if the monitor is cancelled