net.sourceforge.combean.graph.alg.partition
Class AbstractSCCImpl

Package class diagram package AbstractSCCImpl
java.lang.Object
  extended by net.sourceforge.combean.graph.alg.AbstractGraphAlg
      extended by net.sourceforge.combean.graph.alg.partition.AbstractSCCImpl
All Implemented Interfaces:
GraphAlgorithm, PartitioningAlg, StronglyConnectedComponentsAlg
Direct Known Subclasses:
SCCByDFSImpl, SCCByDoubleDFSImpl

public abstract class AbstractSCCImpl
extends AbstractGraphAlg
implements StronglyConnectedComponentsAlg

A convenience class for implementing SCC algorithms.


Constructor Summary
AbstractSCCImpl()
          constructor
 
Method Summary
 NodePartitionVisitor getVisitor()
           
 NodeNumbering setNodeNumberingAsVisitor()
          Set a NodeNumbering as Visitor for the strongly connected components.
 void setVisitor(NodePartitionVisitor partitionVisitor)
          Set the visitor which shall be informed about the partitions which were found.
 
Methods inherited from class net.sourceforge.combean.graph.alg.AbstractGraphAlg
getGraph, setGraph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.combean.interfaces.graph.alg.GraphAlgorithm
getGraph, run, setGraph
 

Constructor Detail

AbstractSCCImpl

public AbstractSCCImpl()
constructor

Method Detail

setVisitor

public void setVisitor(NodePartitionVisitor partitionVisitor)
Description copied from interface: PartitioningAlg
Set the visitor which shall be informed about the partitions which were found.

Specified by:
setVisitor in interface PartitioningAlg

getVisitor

public NodePartitionVisitor getVisitor()
Specified by:
getVisitor in interface PartitioningAlg
Returns:
the partition visitor

setNodeNumberingAsVisitor

public final NodeNumbering setNodeNumberingAsVisitor()
Set a NodeNumbering as Visitor for the strongly connected components. The NodeNumbering will be filled with the number of the SCCs, starting with 0.

Returns:
the NodeNumbering to be used as Visitor