9package com.google.ortools.linearsolver;
11import java.lang.reflect.*;
40 private transient long swigCPtr;
49 return (obj ==
null) ? 0 : obj.swigCPtr;
56 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
58 obj.swigCMemOwn =
false;
64 @SuppressWarnings({
"deprecation",
"removal"})
73 mainJNI.delete_MPSolverParameters(swigCPtr);
80 return mainJNI.MPSolverParameters_kDefaultRelativeMipGap_get();
84 return mainJNI.MPSolverParameters_kDefaultPrimalTolerance_get();
88 return mainJNI.MPSolverParameters_kDefaultDualTolerance_get();
103 this(mainJNI.new_MPSolverParameters(),
true);
110 mainJNI.MPSolverParameters_setDoubleParam(swigCPtr,
this, param.swigValue(), value);
117 mainJNI.MPSolverParameters_setIntegerParam(swigCPtr,
this, param.swigValue(), value);
124 return mainJNI.MPSolverParameters_getDoubleParam(swigCPtr,
this, param.swigValue());
131 return mainJNI.MPSolverParameters_getIntegerParam(swigCPtr,
this, param.swigValue());
160 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
161 return swigValues[swigValue];
163 if (swigEnum.swigValue == swigValue)
165 throw new IllegalArgumentException(
"No enum " +
DoubleParam.class +
" with value " + swigValue);
168 @SuppressWarnings(
"unused")
170 this.swigValue = SwigNext.next++;
173 @SuppressWarnings(
"unused")
174 private DoubleParam(
int swigValue) {
175 this.swigValue = swigValue;
176 SwigNext.next = swigValue+1;
179 @SuppressWarnings(
"unused")
180 private DoubleParam(DoubleParam swigEnum) {
181 this.swigValue = swigEnum.swigValue;
182 SwigNext.next = this.swigValue+1;
185 private final int swigValue;
187 private static class SwigNext {
188 private static int next = 0;
199 PRESOLVE(mainJNI.MPSolverParameters_PRESOLVE_get()),
211 SCALING(mainJNI.MPSolverParameters_SCALING_get());
219 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
220 return swigValues[swigValue];
222 if (swigEnum.swigValue == swigValue)
224 throw new IllegalArgumentException(
"No enum " +
IntegerParam.class +
" with value " + swigValue);
227 @SuppressWarnings(
"unused")
229 this.swigValue = SwigNext.next++;
232 @SuppressWarnings(
"unused")
233 private IntegerParam(
int swigValue) {
234 this.swigValue = swigValue;
235 SwigNext.next = swigValue+1;
238 @SuppressWarnings(
"unused")
239 private IntegerParam(IntegerParam swigEnum) {
240 this.swigValue = swigEnum.swigValue;
241 SwigNext.next = this.swigValue+1;
244 private final int swigValue;
246 private static class SwigNext {
247 private static int next = 0;
270 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
271 return swigValues[swigValue];
273 if (swigEnum.swigValue == swigValue)
275 throw new IllegalArgumentException(
"No enum " +
PresolveValues.class +
" with value " + swigValue);
278 @SuppressWarnings(
"unused")
280 this.swigValue = SwigNext.next++;
283 @SuppressWarnings(
"unused")
284 private PresolveValues(
int swigValue) {
285 this.swigValue = swigValue;
286 SwigNext.next = swigValue+1;
289 @SuppressWarnings(
"unused")
290 private PresolveValues(PresolveValues swigEnum) {
291 this.swigValue = swigEnum.swigValue;
292 SwigNext.next = this.swigValue+1;
295 private final int swigValue;
297 private static class SwigNext {
298 private static int next = 0;
309 DUAL(mainJNI.MPSolverParameters_DUAL_get()),
313 PRIMAL(mainJNI.MPSolverParameters_PRIMAL_get()),
317 BARRIER(mainJNI.MPSolverParameters_BARRIER_get());
325 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
326 return swigValues[swigValue];
328 if (swigEnum.swigValue == swigValue)
330 throw new IllegalArgumentException(
"No enum " +
LpAlgorithmValues.class +
" with value " + swigValue);
333 @SuppressWarnings(
"unused")
335 this.swigValue = SwigNext.next++;
338 @SuppressWarnings(
"unused")
339 private LpAlgorithmValues(
int swigValue) {
340 this.swigValue = swigValue;
341 SwigNext.next = swigValue+1;
344 @SuppressWarnings(
"unused")
345 private LpAlgorithmValues(LpAlgorithmValues swigEnum) {
346 this.swigValue = swigEnum.swigValue;
347 SwigNext.next = this.swigValue+1;
350 private final int swigValue;
352 private static class SwigNext {
353 private static int next = 0;
377 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
378 return swigValues[swigValue];
380 if (swigEnum.swigValue == swigValue)
382 throw new IllegalArgumentException(
"No enum " +
IncrementalityValues.class +
" with value " + swigValue);
385 @SuppressWarnings(
"unused")
387 this.swigValue = SwigNext.next++;
390 @SuppressWarnings(
"unused")
391 private IncrementalityValues(
int swigValue) {
392 this.swigValue = swigValue;
393 SwigNext.next = swigValue+1;
396 @SuppressWarnings(
"unused")
397 private IncrementalityValues(IncrementalityValues swigEnum) {
398 this.swigValue = swigEnum.swigValue;
399 SwigNext.next = this.swigValue+1;
402 private final int swigValue;
404 private static class SwigNext {
405 private static int next = 0;
428 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
429 return swigValues[swigValue];
431 if (swigEnum.swigValue == swigValue)
433 throw new IllegalArgumentException(
"No enum " +
ScalingValues.class +
" with value " + swigValue);
436 @SuppressWarnings(
"unused")
438 this.swigValue = SwigNext.next++;
441 @SuppressWarnings(
"unused")
442 private ScalingValues(
int swigValue) {
443 this.swigValue = swigValue;
444 SwigNext.next = swigValue+1;
447 @SuppressWarnings(
"unused")
448 private ScalingValues(ScalingValues swigEnum) {
449 this.swigValue = swigEnum.swigValue;
450 SwigNext.next = this.swigValue+1;
453 private final int swigValue;
455 private static class SwigNext {
456 private static int next = 0;