chord.util.graph
Class SimpleCyclesFinder<Node>

java.lang.Object
  extended by chord.util.graph.SimpleCyclesFinder<Node>
Type Parameters:
Node - The type of the graph's nodes.

public class SimpleCyclesFinder<Node>
extends java.lang.Object

Algorithm for finding all simple cycles in a directed graph.

Author:
Mayur Naik (mhn@cs.stanford.edu)

Method Summary
static
<Node> void
run(IGraph<Node> graph, IGraphEntityVisitor<Node> visitor)
          Finds all simple cycles in a given directed graph by invoking a given visitor on each simple cycle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

run

public static <Node> void run(IGraph<Node> graph,
                              IGraphEntityVisitor<Node> visitor)
Finds all simple cycles in a given directed graph by invoking a given visitor on each simple cycle.

Type Parameters:
Node - The type of the graph's nodes.
Parameters:
graph - A directed graph.
visitor - A visitor over the graph's simple cycles.