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
All Methods Static Methods Instance Methods Concrete Methods 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()protected static longswigRelease(MinCostFlow obj)-
Methods inherited from class com.google.ortools.graph.MinCostFlowBase
getCPtr, swigRelease
-
-
-
-
Method Detail
-
getCPtr
protected static long getCPtr(MinCostFlow obj)
-
swigRelease
protected static long swigRelease(MinCostFlow obj)
-
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
public MinCostFlowBase.Status solve()
-
solveMaxFlowWithMinCost
public MinCostFlowBase.Status 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)
-
-