net.sourceforge.combean.graph.alg
Class AbstractGraphAlg

Package class diagram package AbstractGraphAlg
java.lang.Object
  extended by net.sourceforge.combean.graph.alg.AbstractGraphAlg
All Implemented Interfaces:
GraphAlgorithm
Direct Known Subclasses:
AbstractAugmentingPathAlg, AbstractGraphTraversalAlg, AbstractLabellingAlg, AbstractSCCImpl, CycleInPredMapByDoubleTraversalDetectionAlg, FindPathByTraversalAlg, MinCostFlowByLPAlg, MulticommodityMinCostFlowByLPAlg

public abstract class AbstractGraphAlg
extends Object
implements GraphAlgorithm

Convenience base class for GraphAlgorithms. Automatically sets all graph properties (also those defined in subclasses) when setGraph() is called on an object derived from this class. Uses a GraphPropertyInitializer to achieve this.

See Also:
GraphPropertyInitializer

Constructor Summary
AbstractGraphAlg()
          Constructor
 
Method Summary
 Graph getGraph()
           
 void setGraph(Graph g)
          Set the graph on which the algorithm shall work.
 
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
run
 

Constructor Detail

AbstractGraphAlg

public AbstractGraphAlg()
Constructor

Method Detail

setGraph

public void setGraph(Graph g)
              throws UnsupportedGraphProperty
Description copied from interface: GraphAlgorithm
Set the graph on which the algorithm shall work.

Specified by:
setGraph in interface GraphAlgorithm
Parameters:
g - the graph
Throws:
UnsupportedGraphProperty - thrown if g does not have all properties required by the algorithm.

getGraph

public final Graph getGraph()
Specified by:
getGraph in interface GraphAlgorithm
Returns:
the graph on which the algorithm works.