9 package com.google.ortools.graph;
12 private transient long swigCPtr;
15 protected MaxFlow(
long cPtr,
boolean cMemoryOwn) {
21 return (obj ==
null) ? 0 : obj.swigCPtr;
28 public synchronized void delete() {
32 mainJNI.delete_MaxFlow(swigCPtr);
39 this(mainJNI.new_MaxFlow(),
true);
43 return mainJNI.MaxFlow_addArcWithCapacity(swigCPtr,
this, tail, head, capacity);
47 return mainJNI.MaxFlow_getNumNodes(swigCPtr,
this);
51 return mainJNI.MaxFlow_getNumArcs(swigCPtr,
this);
55 return mainJNI.MaxFlow_getTail(swigCPtr,
this, arc);
59 return mainJNI.MaxFlow_getHead(swigCPtr,
this, arc);
63 return mainJNI.MaxFlow_getCapacity(swigCPtr,
this, arc);
71 return mainJNI.MaxFlow_getOptimalFlow(swigCPtr,
this);
75 return mainJNI.MaxFlow_getFlow(swigCPtr,
this, arc);
79 mainJNI.MaxFlow_setArcCapacity(swigCPtr,
this, arc, capacity);
94 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
95 return swigValues[swigValue];
96 for (
Status swigEnum : swigValues)
97 if (swigEnum.swigValue == swigValue)
99 throw new IllegalArgumentException(
"No enum " +
Status.class +
" with value " + swigValue);
102 @SuppressWarnings(
"unused")
104 this.swigValue = SwigNext.next++;
107 @SuppressWarnings(
"unused")
108 private Status(
int swigValue) {
109 this.swigValue = swigValue;
110 SwigNext.next = swigValue+1;
113 @SuppressWarnings(
"unused")
114 private Status(Status swigEnum) {
115 this.swigValue = swigEnum.swigValue;
116 SwigNext.next = this.swigValue+1;
119 private final int swigValue;
121 private static class SwigNext {
122 private static int next = 0;