net.sourceforge.combean.interfaces.graph.alg.flow
Interface MinCostFlowAlg

Package class diagram package MinCostFlowAlg
All Superinterfaces:
AbstractFlowAlg, FeasibleFlowAlg, GraphAlgorithm
All Known Subinterfaces:
MulticommodityMinCostFlowAlg
All Known Implementing Classes:
MinCostFlowByLPAlg, MulticommodityMinCostFlowByLPAlg

public interface MinCostFlowAlg
extends FeasibleFlowAlg

A min-cost flow algorithm (with positive flows in the range 0 ... capacity).


Method Summary
 double getTotalCost()
          Calculate the total cost of the flow.
 void setEdgeWeightsMap(FixedDoubleEdgeMap edgeWeights)
          Set the cost of one unit of flow for each edge.
 
Methods inherited from interface net.sourceforge.combean.interfaces.graph.alg.flow.FeasibleFlowAlg
isFeasible, setInflowMap
 
Methods inherited from interface net.sourceforge.combean.interfaces.graph.alg.flow.AbstractFlowAlg
getFlowMap, setEdgeCapacityMap
 
Methods inherited from interface net.sourceforge.combean.interfaces.graph.alg.GraphAlgorithm
getGraph, run, setGraph
 

Method Detail

setEdgeWeightsMap

void setEdgeWeightsMap(FixedDoubleEdgeMap edgeWeights)
Set the cost of one unit of flow for each edge. If this map is not set, the cost is assumed to be zero for each edge.

Parameters:
edgeWeights - a map containing the cost of each edge in the graph

getTotalCost

double getTotalCost()
Calculate the total cost of the flow. May only be called after the algorithm has been executed.

Returns:
the total cost of the flow.