Package com.google.ortools.graph
Class MinCostFlow
java.lang.Object
com.google.ortools.graph.MinCostFlowBase
com.google.ortools.graph.MinCostFlow
public class MinCostFlow extends MinCostFlowBase
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.ortools.graph.MinCostFlowBase
MinCostFlowBase.Status -
Field Summary
Fields inherited from class com.google.ortools.graph.MinCostFlowBase
swigCMemOwn -
Constructor Summary
Constructors Modifier Constructor Description MinCostFlow()MinCostFlow(int reserve_num_nodes)MinCostFlow(int reserve_num_nodes, int reserve_num_arcs)protectedMinCostFlow(long cPtr, boolean cMemoryOwn) -
Method Summary
Modifier and Type Method Description intaddArcWithCapacityAndUnitCost(int tail, int head, long capacity, long unit_cost)voiddelete()protected voidfinalize()longgetCapacity(int arc)protected static longgetCPtr(MinCostFlow obj)longgetFlow(int arc)intgetHead(int arc)longgetMaximumFlow()intgetNumArcs()intgetNumNodes()longgetOptimalCost()longgetSupply(int node)intgetTail(int arc)longgetUnitCost(int arc)voidsetNodeSupply(int node, long supply)MinCostFlowBase.Statussolve()MinCostFlowBase.StatussolveMaxFlowWithMinCost()Methods inherited from class com.google.ortools.graph.MinCostFlowBase
getCPtrMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
MinCostFlow
protected MinCostFlow(long cPtr, boolean cMemoryOwn) -
MinCostFlow
public MinCostFlow(int reserve_num_nodes, int reserve_num_arcs) -
MinCostFlow
public MinCostFlow(int reserve_num_nodes) -
MinCostFlow
public MinCostFlow()
-
-
Method Details
-
getCPtr
-
finalize
protected void finalize()- Overrides:
finalizein classMinCostFlowBase
-
delete
public void delete()- Overrides:
deletein classMinCostFlowBase
-
addArcWithCapacityAndUnitCost
public int addArcWithCapacityAndUnitCost(int tail, int head, long capacity, long unit_cost) -
setNodeSupply
public void setNodeSupply(int node, long supply) -
solve
-
solveMaxFlowWithMinCost
-
getOptimalCost
public long getOptimalCost() -
getMaximumFlow
public long getMaximumFlow() -
getFlow
public long getFlow(int arc) -
getNumNodes
public int getNumNodes() -
getNumArcs
public int getNumArcs() -
getTail
public int getTail(int arc) -
getHead
public int getHead(int arc) -
getCapacity
public long getCapacity(int arc) -
getSupply
public long getSupply(int node) -
getUnitCost
public long getUnitCost(int arc)
-