net.sourceforge.combean.graph.alg
Class AbstractGraphAlg
java.lang.Object
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
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 |
AbstractGraphAlg
public AbstractGraphAlg()
- Constructor
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.