MPSolverParameters.java
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 4.0.0
4  *
5  * Do not make changes to this file unless you know what you are doing--modify
6  * the SWIG interface file instead.
7  * ----------------------------------------------------------------------------- */
8 
9 package com.google.ortools.linearsolver;
10 
11 import java.lang.reflect.*;
12 
13 public class MPSolverParameters {
14  private transient long swigCPtr;
15  protected transient boolean swigCMemOwn;
16 
17  protected MPSolverParameters(long cPtr, boolean cMemoryOwn) {
18  swigCMemOwn = cMemoryOwn;
19  swigCPtr = cPtr;
20  }
21 
22  protected static long getCPtr(MPSolverParameters obj) {
23  return (obj == null) ? 0 : obj.swigCPtr;
24  }
25 
26  @SuppressWarnings("deprecation")
27  protected void finalize() {
28  delete();
29  }
30 
31  public synchronized void delete() {
32  if (swigCPtr != 0) {
33  if (swigCMemOwn) {
34  swigCMemOwn = false;
36  }
37  swigCPtr = 0;
38  }
39  }
40 
41  public static double getKDefaultRelativeMipGap() {
43  }
44 
45  public static double getKDefaultPrimalTolerance() {
47  }
48 
49  public static double getKDefaultDualTolerance() {
51  }
52 
55  }
56 
59  }
60 
61  public MPSolverParameters() {
63  }
64 
65  public void setDoubleParam(MPSolverParameters.DoubleParam param, double value) {
66  main_research_linear_solverJNI.MPSolverParameters_setDoubleParam(swigCPtr, this, param.swigValue(), value);
67  }
68 
69  public void setIntegerParam(MPSolverParameters.IntegerParam param, int value) {
70  main_research_linear_solverJNI.MPSolverParameters_setIntegerParam(swigCPtr, this, param.swigValue(), value);
71  }
72 
74  return main_research_linear_solverJNI.MPSolverParameters_getDoubleParam(swigCPtr, this, param.swigValue());
75  }
76 
78  return main_research_linear_solverJNI.MPSolverParameters_getIntegerParam(swigCPtr, this, param.swigValue());
79  }
80 
81  public enum DoubleParam {
85 
86  public final int swigValue() {
87  return swigValue;
88  }
89 
90  public static DoubleParam swigToEnum(int swigValue) {
91  DoubleParam[] swigValues = DoubleParam.class.getEnumConstants();
92  if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
93  return swigValues[swigValue];
94  for (DoubleParam swigEnum : swigValues)
95  if (swigEnum.swigValue == swigValue)
96  return swigEnum;
97  throw new IllegalArgumentException("No enum " + DoubleParam.class + " with value " + swigValue);
98  }
99 
100  @SuppressWarnings("unused")
101  private DoubleParam() {
102  this.swigValue = SwigNext.next++;
103  }
104 
105  @SuppressWarnings("unused")
106  private DoubleParam(int swigValue) {
107  this.swigValue = swigValue;
108  SwigNext.next = swigValue+1;
109  }
110 
111  @SuppressWarnings("unused")
112  private DoubleParam(DoubleParam swigEnum) {
113  this.swigValue = swigEnum.swigValue;
114  SwigNext.next = this.swigValue+1;
115  }
116 
117  private final int swigValue;
118 
119  private static class SwigNext {
120  private static int next = 0;
121  }
122  }
123 
124  public enum IntegerParam {
129 
130  public final int swigValue() {
131  return swigValue;
132  }
133 
134  public static IntegerParam swigToEnum(int swigValue) {
135  IntegerParam[] swigValues = IntegerParam.class.getEnumConstants();
136  if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
137  return swigValues[swigValue];
138  for (IntegerParam swigEnum : swigValues)
139  if (swigEnum.swigValue == swigValue)
140  return swigEnum;
141  throw new IllegalArgumentException("No enum " + IntegerParam.class + " with value " + swigValue);
142  }
143 
144  @SuppressWarnings("unused")
145  private IntegerParam() {
146  this.swigValue = SwigNext.next++;
147  }
148 
149  @SuppressWarnings("unused")
150  private IntegerParam(int swigValue) {
151  this.swigValue = swigValue;
152  SwigNext.next = swigValue+1;
153  }
154 
155  @SuppressWarnings("unused")
156  private IntegerParam(IntegerParam swigEnum) {
157  this.swigValue = swigEnum.swigValue;
158  SwigNext.next = this.swigValue+1;
159  }
160 
161  private final int swigValue;
162 
163  private static class SwigNext {
164  private static int next = 0;
165  }
166  }
167 
168  public enum PresolveValues {
171 
172  public final int swigValue() {
173  return swigValue;
174  }
175 
176  public static PresolveValues swigToEnum(int swigValue) {
177  PresolveValues[] swigValues = PresolveValues.class.getEnumConstants();
178  if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
179  return swigValues[swigValue];
180  for (PresolveValues swigEnum : swigValues)
181  if (swigEnum.swigValue == swigValue)
182  return swigEnum;
183  throw new IllegalArgumentException("No enum " + PresolveValues.class + " with value " + swigValue);
184  }
185 
186  @SuppressWarnings("unused")
187  private PresolveValues() {
188  this.swigValue = SwigNext.next++;
189  }
190 
191  @SuppressWarnings("unused")
192  private PresolveValues(int swigValue) {
193  this.swigValue = swigValue;
194  SwigNext.next = swigValue+1;
195  }
196 
197  @SuppressWarnings("unused")
198  private PresolveValues(PresolveValues swigEnum) {
199  this.swigValue = swigEnum.swigValue;
200  SwigNext.next = this.swigValue+1;
201  }
202 
203  private final int swigValue;
204 
205  private static class SwigNext {
206  private static int next = 0;
207  }
208  }
209 
210  public enum LpAlgorithmValues {
214 
215  public final int swigValue() {
216  return swigValue;
217  }
218 
219  public static LpAlgorithmValues swigToEnum(int swigValue) {
220  LpAlgorithmValues[] swigValues = LpAlgorithmValues.class.getEnumConstants();
221  if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
222  return swigValues[swigValue];
223  for (LpAlgorithmValues swigEnum : swigValues)
224  if (swigEnum.swigValue == swigValue)
225  return swigEnum;
226  throw new IllegalArgumentException("No enum " + LpAlgorithmValues.class + " with value " + swigValue);
227  }
228 
229  @SuppressWarnings("unused")
230  private LpAlgorithmValues() {
231  this.swigValue = SwigNext.next++;
232  }
233 
234  @SuppressWarnings("unused")
235  private LpAlgorithmValues(int swigValue) {
236  this.swigValue = swigValue;
237  SwigNext.next = swigValue+1;
238  }
239 
240  @SuppressWarnings("unused")
241  private LpAlgorithmValues(LpAlgorithmValues swigEnum) {
242  this.swigValue = swigEnum.swigValue;
243  SwigNext.next = this.swigValue+1;
244  }
245 
246  private final int swigValue;
247 
248  private static class SwigNext {
249  private static int next = 0;
250  }
251  }
252 
253  public enum IncrementalityValues {
256 
257  public final int swigValue() {
258  return swigValue;
259  }
260 
261  public static IncrementalityValues swigToEnum(int swigValue) {
262  IncrementalityValues[] swigValues = IncrementalityValues.class.getEnumConstants();
263  if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
264  return swigValues[swigValue];
265  for (IncrementalityValues swigEnum : swigValues)
266  if (swigEnum.swigValue == swigValue)
267  return swigEnum;
268  throw new IllegalArgumentException("No enum " + IncrementalityValues.class + " with value " + swigValue);
269  }
270 
271  @SuppressWarnings("unused")
272  private IncrementalityValues() {
273  this.swigValue = SwigNext.next++;
274  }
275 
276  @SuppressWarnings("unused")
277  private IncrementalityValues(int swigValue) {
278  this.swigValue = swigValue;
279  SwigNext.next = swigValue+1;
280  }
281 
282  @SuppressWarnings("unused")
283  private IncrementalityValues(IncrementalityValues swigEnum) {
284  this.swigValue = swigEnum.swigValue;
285  SwigNext.next = this.swigValue+1;
286  }
287 
288  private final int swigValue;
289 
290  private static class SwigNext {
291  private static int next = 0;
292  }
293  }
294 
295  public enum ScalingValues {
298 
299  public final int swigValue() {
300  return swigValue;
301  }
302 
303  public static ScalingValues swigToEnum(int swigValue) {
304  ScalingValues[] swigValues = ScalingValues.class.getEnumConstants();
305  if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
306  return swigValues[swigValue];
307  for (ScalingValues swigEnum : swigValues)
308  if (swigEnum.swigValue == swigValue)
309  return swigEnum;
310  throw new IllegalArgumentException("No enum " + ScalingValues.class + " with value " + swigValue);
311  }
312 
313  @SuppressWarnings("unused")
314  private ScalingValues() {
315  this.swigValue = SwigNext.next++;
316  }
317 
318  @SuppressWarnings("unused")
319  private ScalingValues(int swigValue) {
320  this.swigValue = swigValue;
321  SwigNext.next = swigValue+1;
322  }
323 
324  @SuppressWarnings("unused")
325  private ScalingValues(ScalingValues swigEnum) {
326  this.swigValue = swigEnum.swigValue;
327  SwigNext.next = this.swigValue+1;
328  }
329 
330  private final int swigValue;
331 
332  private static class SwigNext {
333  private static int next = 0;
334  }
335  }
336 
337 }
void setIntegerParam(MPSolverParameters.IntegerParam param, int value)
static final native double MPSolverParameters_getDoubleParam(long jarg1, MPSolverParameters jarg1_, int jarg2)
static final native int MPSolverParameters_getIntegerParam(long jarg1, MPSolverParameters jarg1_, int jarg2)
static final native void delete_MPSolverParameters(long jarg1)
double getDoubleParam(MPSolverParameters.DoubleParam param)
void setDoubleParam(MPSolverParameters.DoubleParam param, double value)
static final native double MPSolverParameters_kDefaultDualTolerance_get()
static final native void MPSolverParameters_setIntegerParam(long jarg1, MPSolverParameters jarg1_, int jarg2, int jarg3)
int getIntegerParam(MPSolverParameters.IntegerParam param)
static MPSolverParameters.IncrementalityValues getKDefaultIncrementality()
static final native double MPSolverParameters_kDefaultPrimalTolerance_get()
static MPSolverParameters.PresolveValues getKDefaultPresolve()
static final native double MPSolverParameters_kDefaultRelativeMipGap_get()
static final native void MPSolverParameters_setDoubleParam(long jarg1, MPSolverParameters jarg1_, int jarg2, double jarg3)