9 package com.google.ortools.graph;
12 private transient long swigCPtr;
13 protected transient boolean swigCMemOwn;
15 protected MaxFlow(
long cPtr,
boolean cMemoryOwn) {
16 swigCMemOwn = cMemoryOwn;
20 protected static long getCPtr(
MaxFlow obj) {
21 return (obj ==
null) ? 0 : obj.swigCPtr;
24 @SuppressWarnings(
"deprecation")
25 protected
void finalize() {
29 public synchronized void delete() {
33 mainJNI.delete_MaxFlow(swigCPtr);
40 this(mainJNI.new_MaxFlow(),
true);
44 return mainJNI.MaxFlow_addArcWithCapacity(swigCPtr,
this, tail, head, capacity);
48 return mainJNI.MaxFlow_getNumNodes(swigCPtr,
this);
52 return mainJNI.MaxFlow_getNumArcs(swigCPtr,
this);
56 return mainJNI.MaxFlow_getTail(swigCPtr,
this, arc);
60 return mainJNI.MaxFlow_getHead(swigCPtr,
this, arc);
64 return mainJNI.MaxFlow_getCapacity(swigCPtr,
this, arc);
72 return mainJNI.MaxFlow_getOptimalFlow(swigCPtr,
this);
76 return mainJNI.MaxFlow_getFlow(swigCPtr,
this, arc);
80 mainJNI.MaxFlow_setArcCapacity(swigCPtr,
this, arc, capacity);
95 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
96 return swigValues[swigValue];
97 for (
Status swigEnum : swigValues)
98 if (swigEnum.swigValue == swigValue)
100 throw new IllegalArgumentException(
"No enum " +
Status.class +
" with value " + swigValue);
103 @SuppressWarnings(
"unused")
105 this.swigValue = SwigNext.next++;
108 @SuppressWarnings(
"unused")
109 private Status(
int swigValue) {
110 this.swigValue = swigValue;
111 SwigNext.next = swigValue+1;
114 @SuppressWarnings(
"unused")
115 private Status(Status swigEnum) {
116 this.swigValue = swigEnum.swigValue;
117 SwigNext.next = this.swigValue+1;
120 private final int swigValue;
122 private static class SwigNext {
123 private static int next = 0;