Java Reference

Java Reference

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.2
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
9package 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
58 public long value(long index) {
59 return mainJNI.IntVarLocalSearchOperatorTemplate_value(swigCPtr, this, index);
60 }
61
65 public IntVar var(long index) {
66 long cPtr = mainJNI.IntVarLocalSearchOperatorTemplate_var(swigCPtr, this, index);
67 return (cPtr == 0) ? null : new IntVar(cPtr, false);
68 }
69
70 public long oldValue(long index) {
71 return mainJNI.IntVarLocalSearchOperatorTemplate_oldValue(swigCPtr, this, index);
72 }
73
74 public void setValue(long index, long value) {
75 mainJNI.IntVarLocalSearchOperatorTemplate_setValue(swigCPtr, this, index, value);
76 }
77
78 public boolean activated(long index) {
79 return mainJNI.IntVarLocalSearchOperatorTemplate_activated(swigCPtr, this, index);
80 }
81
82 public void activate(long index) {
83 mainJNI.IntVarLocalSearchOperatorTemplate_activate(swigCPtr, this, index);
84 }
85
86 public void deactivate(long index) {
87 mainJNI.IntVarLocalSearchOperatorTemplate_deactivate(swigCPtr, this, index);
88 }
89
90 public void addVars(IntVar[] vars) {
91 mainJNI.IntVarLocalSearchOperatorTemplate_addVars(swigCPtr, this, vars);
92 }
93
99 public void onStart() {
100 mainJNI.IntVarLocalSearchOperatorTemplate_onStart(swigCPtr, this);
101 }
102
103}
void onStart()
Called by Start() after synchronizing the operator with the current assignment.
long value(long index)
Returns the value in the current assignment of the variable of given index.
This class represent a reversible FIFO structure.