Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
LocalSearchFilter.java
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (https://www.swig.org).
3 * Version 4.2.1
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
43public class LocalSearchFilter extends BaseObject {
44 private transient long swigCPtr;
45
46 protected LocalSearchFilter(long cPtr, boolean cMemoryOwn) {
47 super(mainJNI.LocalSearchFilter_SWIGUpcast(cPtr), cMemoryOwn);
48 swigCPtr = cPtr;
49 }
50
51 protected static long getCPtr(LocalSearchFilter obj) {
52 return (obj == null) ? 0 : obj.swigCPtr;
53 }
54
55 protected static long swigRelease(LocalSearchFilter obj) {
56 long ptr = 0;
57 if (obj != null) {
58 if (!obj.swigCMemOwn)
59 throw new RuntimeException("Cannot release ownership as memory is not owned");
60 ptr = obj.swigCPtr;
61 obj.swigCMemOwn = false;
62 obj.delete();
63 }
64 return ptr;
65 }
66
67 @SuppressWarnings({"deprecation", "removal"})
68 protected void finalize() {
69 delete();
70 }
71
72 public synchronized void delete() {
73 if (swigCPtr != 0) {
74 if (swigCMemOwn) {
75 swigCMemOwn = false;
76 mainJNI.delete_LocalSearchFilter(swigCPtr);
77 }
78 swigCPtr = 0;
79 }
80 super.delete();
81 }
82
83 protected void swigDirectorDisconnect() {
84 swigCMemOwn = false;
85 delete();
86 }
87
88 public void swigReleaseOwnership() {
89 swigCMemOwn = false;
90 mainJNI.LocalSearchFilter_change_ownership(this, swigCPtr, false);
91 }
92
93 public void swigTakeOwnership() {
94 swigCMemOwn = true;
95 mainJNI.LocalSearchFilter_change_ownership(this, swigCPtr, true);
96 }
97
102 public void Relax(Assignment delta, Assignment deltadelta) {
103 if (getClass() == LocalSearchFilter.class) mainJNI.LocalSearchFilter_Relax(swigCPtr, this, Assignment.getCPtr(delta), delta, Assignment.getCPtr(deltadelta), deltadelta); else mainJNI.LocalSearchFilter_RelaxSwigExplicitLocalSearchFilter(swigCPtr, this, Assignment.getCPtr(delta), delta, Assignment.getCPtr(deltadelta), deltadelta);
104 }
105
109 public void Commit(Assignment delta, Assignment deltadelta) {
110 if (getClass() == LocalSearchFilter.class) mainJNI.LocalSearchFilter_Commit(swigCPtr, this, Assignment.getCPtr(delta), delta, Assignment.getCPtr(deltadelta), deltadelta); else mainJNI.LocalSearchFilter_CommitSwigExplicitLocalSearchFilter(swigCPtr, this, Assignment.getCPtr(delta), delta, Assignment.getCPtr(deltadelta), deltadelta);
111 }
112
124 public boolean accept(Assignment delta, Assignment deltadelta, long objective_min, long objective_max) {
125 return mainJNI.LocalSearchFilter_accept(swigCPtr, this, Assignment.getCPtr(delta), delta, Assignment.getCPtr(deltadelta), deltadelta, objective_min, objective_max);
126 }
127
128 public boolean isIncremental() {
129 return (getClass() == LocalSearchFilter.class) ? mainJNI.LocalSearchFilter_isIncremental(swigCPtr, this) : mainJNI.LocalSearchFilter_isIncrementalSwigExplicitLocalSearchFilter(swigCPtr, this);
130 }
131
139 public void synchronize(Assignment assignment, Assignment delta) {
140 mainJNI.LocalSearchFilter_synchronize(swigCPtr, this, Assignment.getCPtr(assignment), assignment, Assignment.getCPtr(delta), delta);
141 }
142
146 public void Revert() {
147 if (getClass() == LocalSearchFilter.class) mainJNI.LocalSearchFilter_Revert(swigCPtr, this); else mainJNI.LocalSearchFilter_RevertSwigExplicitLocalSearchFilter(swigCPtr, this);
148 }
149
153 public void Reset() {
154 if (getClass() == LocalSearchFilter.class) mainJNI.LocalSearchFilter_Reset(swigCPtr, this); else mainJNI.LocalSearchFilter_ResetSwigExplicitLocalSearchFilter(swigCPtr, this);
155 }
156
161 return (getClass() == LocalSearchFilter.class) ? mainJNI.LocalSearchFilter_getSynchronizedObjectiveValue(swigCPtr, this) : mainJNI.LocalSearchFilter_getSynchronizedObjectiveValueSwigExplicitLocalSearchFilter(swigCPtr, this);
162 }
163
168 return (getClass() == LocalSearchFilter.class) ? mainJNI.LocalSearchFilter_getAcceptedObjectiveValue(swigCPtr, this) : mainJNI.LocalSearchFilter_getAcceptedObjectiveValueSwigExplicitLocalSearchFilter(swigCPtr, this);
169 }
170
172 this(mainJNI.new_LocalSearchFilter(), true);
173 mainJNI.LocalSearchFilter_director_connect(this, swigCPtr, true, true);
174 }
175
176}
boolean accept(Assignment delta, Assignment deltadelta, long objective_min, long objective_max)
void Commit(Assignment delta, Assignment deltadelta)
void synchronize(Assignment assignment, Assignment delta)
void Relax(Assignment delta, Assignment deltadelta)