9 package com.google.ortools.linearsolver;
11 import java.lang.reflect.*;
40 private transient long swigCPtr;
41 protected transient boolean swigCMemOwn;
44 swigCMemOwn = cMemoryOwn;
49 return (obj ==
null) ? 0 : obj.swigCPtr;
52 @SuppressWarnings(
"deprecation")
53 protected
void finalize() {
57 public synchronized void delete() {
61 main_research_linear_solverJNI.delete_MPSolverParameters(swigCPtr);
68 return main_research_linear_solverJNI.MPSolverParameters_kDefaultRelativeMipGap_get();
72 return main_research_linear_solverJNI.MPSolverParameters_kDefaultPrimalTolerance_get();
76 return main_research_linear_solverJNI.MPSolverParameters_kDefaultDualTolerance_get();
91 this(main_research_linear_solverJNI.new_MPSolverParameters(),
true);
98 main_research_linear_solverJNI.MPSolverParameters_setDoubleParam(swigCPtr,
this, param.swigValue(), value);
105 main_research_linear_solverJNI.MPSolverParameters_setIntegerParam(swigCPtr,
this, param.swigValue(), value);
112 return main_research_linear_solverJNI.MPSolverParameters_getDoubleParam(swigCPtr,
this, param.swigValue());
119 return main_research_linear_solverJNI.MPSolverParameters_getIntegerParam(swigCPtr,
this, param.swigValue());
129 RELATIVE_MIP_GAP(main_research_linear_solverJNI.MPSolverParameters_RELATIVE_MIP_GAP_get()),
136 PRIMAL_TOLERANCE(main_research_linear_solverJNI.MPSolverParameters_PRIMAL_TOLERANCE_get()),
140 DUAL_TOLERANCE(main_research_linear_solverJNI.MPSolverParameters_DUAL_TOLERANCE_get());
148 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
149 return swigValues[swigValue];
151 if (swigEnum.swigValue == swigValue)
153 throw new IllegalArgumentException(
"No enum " +
DoubleParam.class +
" with value " + swigValue);
156 @SuppressWarnings(
"unused")
158 this.swigValue = SwigNext.next++;
161 @SuppressWarnings(
"unused")
162 private DoubleParam(
int swigValue) {
163 this.swigValue = swigValue;
164 SwigNext.next = swigValue+1;
167 @SuppressWarnings(
"unused")
168 private DoubleParam(DoubleParam swigEnum) {
169 this.swigValue = swigEnum.swigValue;
170 SwigNext.next = this.swigValue+1;
173 private final int swigValue;
175 private static class SwigNext {
176 private static int next = 0;
187 PRESOLVE(main_research_linear_solverJNI.MPSolverParameters_PRESOLVE_get()),
191 LP_ALGORITHM(main_research_linear_solverJNI.MPSolverParameters_LP_ALGORITHM_get()),
195 INCREMENTALITY(main_research_linear_solverJNI.MPSolverParameters_INCREMENTALITY_get()),
199 SCALING(main_research_linear_solverJNI.MPSolverParameters_SCALING_get());
207 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
208 return swigValues[swigValue];
210 if (swigEnum.swigValue == swigValue)
212 throw new IllegalArgumentException(
"No enum " +
IntegerParam.class +
" with value " + swigValue);
215 @SuppressWarnings(
"unused")
217 this.swigValue = SwigNext.next++;
220 @SuppressWarnings(
"unused")
221 private IntegerParam(
int swigValue) {
222 this.swigValue = swigValue;
223 SwigNext.next = swigValue+1;
226 @SuppressWarnings(
"unused")
227 private IntegerParam(IntegerParam swigEnum) {
228 this.swigValue = swigEnum.swigValue;
229 SwigNext.next = this.swigValue+1;
232 private final int swigValue;
234 private static class SwigNext {
235 private static int next = 0;
243 PRESOLVE_OFF(main_research_linear_solverJNI.MPSolverParameters_PRESOLVE_OFF_get()),
244 PRESOLVE_ON(main_research_linear_solverJNI.MPSolverParameters_PRESOLVE_ON_get());
252 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
253 return swigValues[swigValue];
255 if (swigEnum.swigValue == swigValue)
257 throw new IllegalArgumentException(
"No enum " +
PresolveValues.class +
" with value " + swigValue);
260 @SuppressWarnings(
"unused")
262 this.swigValue = SwigNext.next++;
265 @SuppressWarnings(
"unused")
266 private PresolveValues(
int swigValue) {
267 this.swigValue = swigValue;
268 SwigNext.next = swigValue+1;
271 @SuppressWarnings(
"unused")
272 private PresolveValues(PresolveValues swigEnum) {
273 this.swigValue = swigEnum.swigValue;
274 SwigNext.next = this.swigValue+1;
277 private final int swigValue;
279 private static class SwigNext {
280 private static int next = 0;
288 DUAL(main_research_linear_solverJNI.MPSolverParameters_DUAL_get()),
289 PRIMAL(main_research_linear_solverJNI.MPSolverParameters_PRIMAL_get()),
290 BARRIER(main_research_linear_solverJNI.MPSolverParameters_BARRIER_get());
298 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
299 return swigValues[swigValue];
301 if (swigEnum.swigValue == swigValue)
303 throw new IllegalArgumentException(
"No enum " +
LpAlgorithmValues.class +
" with value " + swigValue);
306 @SuppressWarnings(
"unused")
308 this.swigValue = SwigNext.next++;
311 @SuppressWarnings(
"unused")
312 private LpAlgorithmValues(
int swigValue) {
313 this.swigValue = swigValue;
314 SwigNext.next = swigValue+1;
317 @SuppressWarnings(
"unused")
318 private LpAlgorithmValues(LpAlgorithmValues swigEnum) {
319 this.swigValue = swigEnum.swigValue;
320 SwigNext.next = this.swigValue+1;
323 private final int swigValue;
325 private static class SwigNext {
326 private static int next = 0;
350 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
351 return swigValues[swigValue];
353 if (swigEnum.swigValue == swigValue)
355 throw new IllegalArgumentException(
"No enum " +
IncrementalityValues.class +
" with value " + swigValue);
358 @SuppressWarnings(
"unused")
360 this.swigValue = SwigNext.next++;
363 @SuppressWarnings(
"unused")
364 private IncrementalityValues(
int swigValue) {
365 this.swigValue = swigValue;
366 SwigNext.next = swigValue+1;
369 @SuppressWarnings(
"unused")
370 private IncrementalityValues(IncrementalityValues swigEnum) {
371 this.swigValue = swigEnum.swigValue;
372 SwigNext.next = this.swigValue+1;
375 private final int swigValue;
377 private static class SwigNext {
378 private static int next = 0;
389 SCALING_OFF(main_research_linear_solverJNI.MPSolverParameters_SCALING_OFF_get()),
393 SCALING_ON(main_research_linear_solverJNI.MPSolverParameters_SCALING_ON_get());
401 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
402 return swigValues[swigValue];
404 if (swigEnum.swigValue == swigValue)
406 throw new IllegalArgumentException(
"No enum " +
ScalingValues.class +
" with value " + swigValue);
409 @SuppressWarnings(
"unused")
411 this.swigValue = SwigNext.next++;
414 @SuppressWarnings(
"unused")
415 private ScalingValues(
int swigValue) {
416 this.swigValue = swigValue;
417 SwigNext.next = swigValue+1;
420 @SuppressWarnings(
"unused")
421 private ScalingValues(ScalingValues swigEnum) {
422 this.swigValue = swigEnum.swigValue;
423 SwigNext.next = this.swigValue+1;
426 private final int swigValue;
428 private static class SwigNext {
429 private static int next = 0;