|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.combean.graph.alg.AbstractGraphAlg net.sourceforge.combean.graph.alg.flow.AbstractAugmentingPathAlg
public abstract class AbstractAugmentingPathAlg
Maximum flow algorithms which uses the augmenting path approach, i.e. which repeatedly augments the flow on an augmenting path until no such path can be found any more.
Field Summary | |
---|---|
static double |
TOTAL_FLOW_UNDEFINED
|
Constructor Summary | |
---|---|
AbstractAugmentingPathAlg()
constructor |
Method Summary | |
---|---|
protected abstract FixedPath |
findAugmentingPath(DirectedEdgeNeighborhoodGraphProp resG)
|
FixedDoubleEdgeMap |
getFlowMap()
Return the calculated flow. |
Node |
getSource()
|
Node |
getTarget()
|
double |
getTotalFlow()
Get the value of the maximum flow. |
protected void |
init()
|
void |
run()
Execute the algorithm. |
void |
setEdgeCapacityMap(FixedDoubleEdgeMap edgeCapacities)
Set the edge capacities. |
void |
setFlowEdgeMap(DoubleEdgeMap flowMap)
Set the DoubleEdgeMap which is used to store the calculated flow. |
void |
setSource(Node s)
Set the source node of the flow. |
void |
setTarget(Node t)
Set the target node of the flow. |
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, setGraph |
Field Detail |
---|
public static final double TOTAL_FLOW_UNDEFINED
Constructor Detail |
---|
public AbstractAugmentingPathAlg()
Method Detail |
---|
public void setEdgeCapacityMap(FixedDoubleEdgeMap edgeCapacities)
AbstractFlowAlg
setEdgeCapacityMap
in interface AbstractFlowAlg
edgeCapacities
- a map containing the edge capacities.public final void setFlowEdgeMap(DoubleEdgeMap flowMap)
flowMap
- The flowMap to set.public FixedDoubleEdgeMap getFlowMap()
AbstractFlowAlg
getFlowMap
in interface AbstractFlowAlg
public double getTotalFlow()
MaxFlowAlg
getTotalFlow
in interface MaxFlowAlg
public void setSource(Node s)
MaxFlowAlg
setSource
in interface MaxFlowAlg
s
- the source nodepublic void setTarget(Node t)
MaxFlowAlg
setTarget
in interface MaxFlowAlg
t
- the target node.public void run()
GraphAlgorithm
run
in interface GraphAlgorithm
protected abstract FixedPath findAugmentingPath(DirectedEdgeNeighborhoodGraphProp resG)
protected void init()
public final Node getSource()
public final Node getTarget()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |