chord.util.graph
Class SCCFindingVisitor<Node>

java.lang.Object
  extended by chord.util.graph.SCCFindingVisitor<Node>
All Implemented Interfaces:
IGraphEntityVisitor<Node>

public class SCCFindingVisitor<Node>
extends java.lang.Object
implements IGraphEntityVisitor<Node>

A visitor over the Strongly Connected Components (SCCs) of a directed graph.

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

Constructor Summary
SCCFindingVisitor()
           
 
Method Summary
 void epilogue()
          Method called just after finishing visiting all nodes of an entity.
 java.util.List<java.util.Set<Node>> getSCCs()
          Provides all SCCs of the directed graph.
 void prologue()
          Method called just before starting to visit any node of an entity.
 void visit(Node node)
          Method called while visiting each node of an entity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SCCFindingVisitor

public SCCFindingVisitor()
Method Detail

prologue

public void prologue()
Description copied from interface: IGraphEntityVisitor
Method called just before starting to visit any node of an entity.

Specified by:
prologue in interface IGraphEntityVisitor<Node>

visit

public void visit(Node node)
Description copied from interface: IGraphEntityVisitor
Method called while visiting each node of an entity.

Specified by:
visit in interface IGraphEntityVisitor<Node>
Parameters:
node - The visited node.

epilogue

public void epilogue()
Description copied from interface: IGraphEntityVisitor
Method called just after finishing visiting all nodes of an entity.

Specified by:
epilogue in interface IGraphEntityVisitor<Node>

getSCCs

public java.util.List<java.util.Set<Node>> getSCCs()
Provides all SCCs of the directed graph.

Returns:
All SCCs of the directed graph.