IntVarLocalSearchOperatorTemplate.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.constraintsolver;
10 
15  private transient long swigCPtr;
16 
17  protected IntVarLocalSearchOperatorTemplate(long cPtr, boolean cMemoryOwn) {
18  super(mainJNI.IntVarLocalSearchOperatorTemplate_SWIGUpcast(cPtr), cMemoryOwn);
19  swigCPtr = cPtr;
20  }
21 
22  protected static long getCPtr(IntVarLocalSearchOperatorTemplate 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;
35  mainJNI.delete_IntVarLocalSearchOperatorTemplate(swigCPtr);
36  }
37  swigCPtr = 0;
38  }
39  super.delete();
40  }
41 
42  public boolean HoldsDelta() {
43  return mainJNI.IntVarLocalSearchOperatorTemplate_HoldsDelta(swigCPtr, this);
44  }
45 
46  public boolean isIncremental() {
47  return mainJNI.IntVarLocalSearchOperatorTemplate_isIncremental(swigCPtr, this);
48  }
49 
50  public int size() {
51  return mainJNI.IntVarLocalSearchOperatorTemplate_size(swigCPtr, this);
52  }
53 
57  public long value(long index) {
58  return mainJNI.IntVarLocalSearchOperatorTemplate_value(swigCPtr, this, index);
59  }
60 
64  public IntVar var(long index) {
65  long cPtr = mainJNI.IntVarLocalSearchOperatorTemplate_var(swigCPtr, this, index);
66  return (cPtr == 0) ? null : new IntVar(cPtr, false);
67  }
68 
69  public long oldValue(long index) {
70  return mainJNI.IntVarLocalSearchOperatorTemplate_oldValue(swigCPtr, this, index);
71  }
72 
73  public void setValue(long index, long value) {
74  mainJNI.IntVarLocalSearchOperatorTemplate_setValue(swigCPtr, this, index, value);
75  }
76 
77  public boolean activated(long index) {
78  return mainJNI.IntVarLocalSearchOperatorTemplate_activated(swigCPtr, this, index);
79  }
80 
81  public void activate(long index) {
82  mainJNI.IntVarLocalSearchOperatorTemplate_activate(swigCPtr, this, index);
83  }
84 
85  public void deactivate(long index) {
86  mainJNI.IntVarLocalSearchOperatorTemplate_deactivate(swigCPtr, this, index);
87  }
88 
89  public void addVars(IntVar[] vars) {
90  mainJNI.IntVarLocalSearchOperatorTemplate_addVars(swigCPtr, this, vars);
91  }
92 
96  public void onStart() {
97  mainJNI.IntVarLocalSearchOperatorTemplate_onStart(swigCPtr, this);
98  }
99 
100 }
long value(long index)
Returns the value in the current assignment of the variable of given index.
This class represent a reversible FIFO structure.
void onStart()
Called by Start() after synchronizing the operator with the current assignment.