MPSolverParameters.java
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 3.0.12
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  protected void finalize() {
27  delete();
28  }
29 
30  public synchronized void delete() {
31  if (swigCPtr != 0) {
32  if (swigCMemOwn) {
33  swigCMemOwn = false;
35  }
36  swigCPtr = 0;
37  }
38  }
39 
40  public static double getKDefaultRelativeMipGap() {
42  }
43 
44  public static double getKDefaultPrimalTolerance() {
46  }
47 
48  public static double getKDefaultDualTolerance() {
50  }
51 
54  }
55 
58  }
59 
60  public MPSolverParameters() {
62  }
63 
64  public void setDoubleParam(MPSolverParameters.DoubleParam param, double value) {
65  main_research_linear_solverJNI.MPSolverParameters_setDoubleParam(swigCPtr, this, param.swigValue(), value);
66  }
67 
68  public void setIntegerParam(MPSolverParameters.IntegerParam param, int value) {
69  main_research_linear_solverJNI.MPSolverParameters_setIntegerParam(swigCPtr, this, param.swigValue(), value);
70  }
71 
73  return main_research_linear_solverJNI.MPSolverParameters_getDoubleParam(swigCPtr, this, param.swigValue());
74  }
75 
77  return main_research_linear_solverJNI.MPSolverParameters_getIntegerParam(swigCPtr, this, param.swigValue());
78  }
79 
80  public enum DoubleParam {
84 
85  public final int swigValue() {
86  return swigValue;
87  }
88 
89  public static DoubleParam swigToEnum(int swigValue) {
90  DoubleParam[] swigValues = DoubleParam.class.getEnumConstants();
91  if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
92  return swigValues[swigValue];
93  for (DoubleParam swigEnum : swigValues)
94  if (swigEnum.swigValue == swigValue)
95  return swigEnum;
96  throw new IllegalArgumentException("No enum " + DoubleParam.class + " with value " + swigValue);
97  }
98 
99  @SuppressWarnings("unused")
100  private DoubleParam() {
101  this.swigValue = SwigNext.next++;
102  }
103 
104  @SuppressWarnings("unused")
105  private DoubleParam(int swigValue) {
106  this.swigValue = swigValue;
107  SwigNext.next = swigValue+1;
108  }
109 
110  @SuppressWarnings("unused")
111  private DoubleParam(DoubleParam swigEnum) {
112  this.swigValue = swigEnum.swigValue;
113  SwigNext.next = this.swigValue+1;
114  }
115 
116  private final int swigValue;
117 
118  private static class SwigNext {
119  private static int next = 0;
120  }
121  }
122 
123  public enum IntegerParam {
128 
129  public final int swigValue() {
130  return swigValue;
131  }
132 
133  public static IntegerParam swigToEnum(int swigValue) {
134  IntegerParam[] swigValues = IntegerParam.class.getEnumConstants();
135  if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
136  return swigValues[swigValue];
137  for (IntegerParam swigEnum : swigValues)
138  if (swigEnum.swigValue == swigValue)
139  return swigEnum;
140  throw new IllegalArgumentException("No enum " + IntegerParam.class + " with value " + swigValue);
141  }
142 
143  @SuppressWarnings("unused")
144  private IntegerParam() {
145  this.swigValue = SwigNext.next++;
146  }
147 
148  @SuppressWarnings("unused")
149  private IntegerParam(int swigValue) {
150  this.swigValue = swigValue;
151  SwigNext.next = swigValue+1;
152  }
153 
154  @SuppressWarnings("unused")
155  private IntegerParam(IntegerParam swigEnum) {
156  this.swigValue = swigEnum.swigValue;
157  SwigNext.next = this.swigValue+1;
158  }
159 
160  private final int swigValue;
161 
162  private static class SwigNext {
163  private static int next = 0;
164  }
165  }
166 
167  public enum PresolveValues {
170 
171  public final int swigValue() {
172  return swigValue;
173  }
174 
175  public static PresolveValues swigToEnum(int swigValue) {
176  PresolveValues[] swigValues = PresolveValues.class.getEnumConstants();
177  if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
178  return swigValues[swigValue];
179  for (PresolveValues swigEnum : swigValues)
180  if (swigEnum.swigValue == swigValue)
181  return swigEnum;
182  throw new IllegalArgumentException("No enum " + PresolveValues.class + " with value " + swigValue);
183  }
184 
185  @SuppressWarnings("unused")
186  private PresolveValues() {
187  this.swigValue = SwigNext.next++;
188  }
189 
190  @SuppressWarnings("unused")
191  private PresolveValues(int swigValue) {
192  this.swigValue = swigValue;
193  SwigNext.next = swigValue+1;
194  }
195 
196  @SuppressWarnings("unused")
197  private PresolveValues(PresolveValues swigEnum) {
198  this.swigValue = swigEnum.swigValue;
199  SwigNext.next = this.swigValue+1;
200  }
201 
202  private final int swigValue;
203 
204  private static class SwigNext {
205  private static int next = 0;
206  }
207  }
208 
209  public enum LpAlgorithmValues {
213 
214  public final int swigValue() {
215  return swigValue;
216  }
217 
218  public static LpAlgorithmValues swigToEnum(int swigValue) {
219  LpAlgorithmValues[] swigValues = LpAlgorithmValues.class.getEnumConstants();
220  if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
221  return swigValues[swigValue];
222  for (LpAlgorithmValues swigEnum : swigValues)
223  if (swigEnum.swigValue == swigValue)
224  return swigEnum;
225  throw new IllegalArgumentException("No enum " + LpAlgorithmValues.class + " with value " + swigValue);
226  }
227 
228  @SuppressWarnings("unused")
229  private LpAlgorithmValues() {
230  this.swigValue = SwigNext.next++;
231  }
232 
233  @SuppressWarnings("unused")
234  private LpAlgorithmValues(int swigValue) {
235  this.swigValue = swigValue;
236  SwigNext.next = swigValue+1;
237  }
238 
239  @SuppressWarnings("unused")
240  private LpAlgorithmValues(LpAlgorithmValues swigEnum) {
241  this.swigValue = swigEnum.swigValue;
242  SwigNext.next = this.swigValue+1;
243  }
244 
245  private final int swigValue;
246 
247  private static class SwigNext {
248  private static int next = 0;
249  }
250  }
251 
252  public enum IncrementalityValues {
255 
256  public final int swigValue() {
257  return swigValue;
258  }
259 
260  public static IncrementalityValues swigToEnum(int swigValue) {
261  IncrementalityValues[] swigValues = IncrementalityValues.class.getEnumConstants();
262  if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
263  return swigValues[swigValue];
264  for (IncrementalityValues swigEnum : swigValues)
265  if (swigEnum.swigValue == swigValue)
266  return swigEnum;
267  throw new IllegalArgumentException("No enum " + IncrementalityValues.class + " with value " + swigValue);
268  }
269 
270  @SuppressWarnings("unused")
271  private IncrementalityValues() {
272  this.swigValue = SwigNext.next++;
273  }
274 
275  @SuppressWarnings("unused")
276  private IncrementalityValues(int swigValue) {
277  this.swigValue = swigValue;
278  SwigNext.next = swigValue+1;
279  }
280 
281  @SuppressWarnings("unused")
282  private IncrementalityValues(IncrementalityValues swigEnum) {
283  this.swigValue = swigEnum.swigValue;
284  SwigNext.next = this.swigValue+1;
285  }
286 
287  private final int swigValue;
288 
289  private static class SwigNext {
290  private static int next = 0;
291  }
292  }
293 
294  public enum ScalingValues {
297 
298  public final int swigValue() {
299  return swigValue;
300  }
301 
302  public static ScalingValues swigToEnum(int swigValue) {
303  ScalingValues[] swigValues = ScalingValues.class.getEnumConstants();
304  if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
305  return swigValues[swigValue];
306  for (ScalingValues swigEnum : swigValues)
307  if (swigEnum.swigValue == swigValue)
308  return swigEnum;
309  throw new IllegalArgumentException("No enum " + ScalingValues.class + " with value " + swigValue);
310  }
311 
312  @SuppressWarnings("unused")
313  private ScalingValues() {
314  this.swigValue = SwigNext.next++;
315  }
316 
317  @SuppressWarnings("unused")
318  private ScalingValues(int swigValue) {
319  this.swigValue = swigValue;
320  SwigNext.next = swigValue+1;
321  }
322 
323  @SuppressWarnings("unused")
324  private ScalingValues(ScalingValues swigEnum) {
325  this.swigValue = swigEnum.swigValue;
326  SwigNext.next = this.swigValue+1;
327  }
328 
329  private final int swigValue;
330 
331  private static class SwigNext {
332  private static int next = 0;
333  }
334  }
335 
336 }
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)