9package com.google.ortools.graph;
12 private transient long swigCPtr;
15 super(mainJNI.MinCostFlow_SWIGUpcast(cPtr), cMemoryOwn);
20 return (obj ==
null) ? 0 : obj.swigCPtr;
27 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
29 obj.swigCMemOwn =
false;
35 @SuppressWarnings({
"deprecation",
"removal"})
44 mainJNI.delete_MinCostFlow(swigCPtr);
51 public MinCostFlow(
int reserve_num_nodes,
int reserve_num_arcs) {
52 this(mainJNI.new_MinCostFlow__SWIG_0(reserve_num_nodes, reserve_num_arcs),
true);
56 this(mainJNI.new_MinCostFlow__SWIG_1(reserve_num_nodes),
true);
60 this(mainJNI.new_MinCostFlow__SWIG_2(),
true);
64 return mainJNI.MinCostFlow_addArcWithCapacityAndUnitCost(swigCPtr,
this, tail, head, capacity, unit_cost);
68 mainJNI.MinCostFlow_setNodeSupply(swigCPtr,
this, node, supply);
71 public MinCostFlowBase.Status
solve() {
80 return mainJNI.MinCostFlow_getOptimalCost(swigCPtr,
this);
84 return mainJNI.MinCostFlow_getMaximumFlow(swigCPtr,
this);
88 return mainJNI.MinCostFlow_getFlow(swigCPtr,
this, arc);
92 return mainJNI.MinCostFlow_getNumNodes(swigCPtr,
this);
96 return mainJNI.MinCostFlow_getNumArcs(swigCPtr,
this);
100 return mainJNI.MinCostFlow_getTail(swigCPtr,
this, arc);
104 return mainJNI.MinCostFlow_getHead(swigCPtr,
this, arc);
108 return mainJNI.MinCostFlow_getCapacity(swigCPtr,
this, arc);
112 return mainJNI.MinCostFlow_getSupply(swigCPtr,
this, node);
116 return mainJNI.MinCostFlow_getUnitCost(swigCPtr,
this, arc);