java.lang.Object
org.maxicp.cp.engine.constraints.MinCostMaxFlow
Minimum-cost maximum-flow algorithm using successive shortest augmenting paths with potentials.
-
Constructor Summary
ConstructorsConstructorDescriptionMinCostMaxFlow(int H, int numNodes) Creates a minimum-cost maximum-flow solver for a network with a given number of nodes. -
Method Summary
-
Constructor Details
-
MinCostMaxFlow
public MinCostMaxFlow(int H, int numNodes) Creates a minimum-cost maximum-flow solver for a network with a given number of nodes.- Parameters:
H- the maximum cost boundnumNodes- the total number of nodes in the flow network
-
-
Method Details
-
run
public boolean run(int source, int dest, int[][] capMaxNetworkFlow, int[][] costNetworkFlow) -
getTotalCost
public int getTotalCost() -
getTotalFlow
public int getTotalFlow() -
getFlow
public int[][] getFlow()
-