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;
246 PRESOLVE_OFF(main_research_linear_solverJNI.MPSolverParameters_PRESOLVE_OFF_get()),
250 PRESOLVE_ON(main_research_linear_solverJNI.MPSolverParameters_PRESOLVE_ON_get());
258 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
259 return swigValues[swigValue];
261 if (swigEnum.swigValue == swigValue)
263 throw new IllegalArgumentException(
"No enum " +
PresolveValues.class +
" with value " + swigValue);
266 @SuppressWarnings(
"unused")
268 this.swigValue = SwigNext.next++;
271 @SuppressWarnings(
"unused")
272 private PresolveValues(
int swigValue) {
273 this.swigValue = swigValue;
274 SwigNext.next = swigValue+1;
277 @SuppressWarnings(
"unused")
278 private PresolveValues(PresolveValues swigEnum) {
279 this.swigValue = swigEnum.swigValue;
280 SwigNext.next = this.swigValue+1;
283 private final int swigValue;
285 private static class SwigNext {
286 private static int next = 0;
297 DUAL(main_research_linear_solverJNI.MPSolverParameters_DUAL_get()),
301 PRIMAL(main_research_linear_solverJNI.MPSolverParameters_PRIMAL_get()),
305 BARRIER(main_research_linear_solverJNI.MPSolverParameters_BARRIER_get());
313 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
314 return swigValues[swigValue];
316 if (swigEnum.swigValue == swigValue)
318 throw new IllegalArgumentException(
"No enum " +
LpAlgorithmValues.class +
" with value " + swigValue);
321 @SuppressWarnings(
"unused")
323 this.swigValue = SwigNext.next++;
326 @SuppressWarnings(
"unused")
327 private LpAlgorithmValues(
int swigValue) {
328 this.swigValue = swigValue;
329 SwigNext.next = swigValue+1;
332 @SuppressWarnings(
"unused")
333 private LpAlgorithmValues(LpAlgorithmValues swigEnum) {
334 this.swigValue = swigEnum.swigValue;
335 SwigNext.next = this.swigValue+1;
338 private final int swigValue;
340 private static class SwigNext {
341 private static int next = 0;
365 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
366 return swigValues[swigValue];
368 if (swigEnum.swigValue == swigValue)
370 throw new IllegalArgumentException(
"No enum " +
IncrementalityValues.class +
" with value " + swigValue);
373 @SuppressWarnings(
"unused")
375 this.swigValue = SwigNext.next++;
378 @SuppressWarnings(
"unused")
379 private IncrementalityValues(
int swigValue) {
380 this.swigValue = swigValue;
381 SwigNext.next = swigValue+1;
384 @SuppressWarnings(
"unused")
385 private IncrementalityValues(IncrementalityValues swigEnum) {
386 this.swigValue = swigEnum.swigValue;
387 SwigNext.next = this.swigValue+1;
390 private final int swigValue;
392 private static class SwigNext {
393 private static int next = 0;
404 SCALING_OFF(main_research_linear_solverJNI.MPSolverParameters_SCALING_OFF_get()),
408 SCALING_ON(main_research_linear_solverJNI.MPSolverParameters_SCALING_ON_get());
416 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
417 return swigValues[swigValue];
419 if (swigEnum.swigValue == swigValue)
421 throw new IllegalArgumentException(
"No enum " +
ScalingValues.class +
" with value " + swigValue);
424 @SuppressWarnings(
"unused")
426 this.swigValue = SwigNext.next++;
429 @SuppressWarnings(
"unused")
430 private ScalingValues(
int swigValue) {
431 this.swigValue = swigValue;
432 SwigNext.next = swigValue+1;
435 @SuppressWarnings(
"unused")
436 private ScalingValues(ScalingValues swigEnum) {
437 this.swigValue = swigEnum.swigValue;
438 SwigNext.next = this.swigValue+1;
441 private final int swigValue;
443 private static class SwigNext {
444 private static int next = 0;