Package com.google.ortools.graph
Class MinCostFlow
java.lang.Object
com.google.ortools.graph.MinCostFlowBase
com.google.ortools.graph.MinCostFlow
-
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
ConstructorsModifierConstructorDescriptionMinCostFlow(int reserve_num_nodes) MinCostFlow(int reserve_num_nodes, int reserve_num_arcs) protectedMinCostFlow(long cPtr, boolean cMemoryOwn) -
Method Summary
Modifier and TypeMethodDescriptionintaddArcWithCapacityAndUnitCost(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) longintintlonglonggetSupply(int node) intgetTail(int arc) longgetUnitCost(int arc) voidsetNodeSupply(int node, long supply) solve()Methods inherited from class com.google.ortools.graph.MinCostFlowBase
getCPtr
-
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)
-