22 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
26 return (obj ==
null) ?
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero) : obj.swigCPtr;
29 internal static global::System.Runtime.InteropServices.HandleRef swigRelease(IntVarLocalSearchFilter obj) {
32 throw new global::System.ApplicationException(
"Cannot release ownership as memory is not owned");
33 global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
34 obj.swigCMemOwn =
false;
38 return new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
42 protected override void Dispose(
bool disposing) {
44 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
49 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
51 base.Dispose(disposing);
60 objectiveWatcherCallbacks = c;
64 public IntVarLocalSearchFilter(IntVarVector vars) : this(operations_research_constraint_solverPINVOKE.new_IntVarLocalSearchFilter(IntVarVector.getCPtr(vars)), true) {
65 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending)
throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
66 SwigDirectorConnect();
85 IntVar ret = (cPtr == global::System.IntPtr.Zero) ?
null : new
IntVar(cPtr, false);
89 public long Value(
int index) {
103 private void SwigDirectorConnect() {
104 if (SwigDerivedClassHasMethod(
"ToString", swigMethodTypes0))
106 if (SwigDerivedClassHasMethod(
"Relax", swigMethodTypes1))
108 if (SwigDerivedClassHasMethod(
"Commit", swigMethodTypes2))
110 if (SwigDerivedClassHasMethod(
"Accept", swigMethodTypes3))
112 if (SwigDerivedClassHasMethod(
"IsIncremental", swigMethodTypes4))
114 if (SwigDerivedClassHasMethod(
"Revert", swigMethodTypes5))
116 if (SwigDerivedClassHasMethod(
"Reset", swigMethodTypes6))
118 if (SwigDerivedClassHasMethod(
"GetSynchronizedObjectiveValue", swigMethodTypes7))
120 if (SwigDerivedClassHasMethod(
"GetAcceptedObjectiveValue", swigMethodTypes8))
122 if (SwigDerivedClassHasMethod(
"OnSynchronize", swigMethodTypes9))
124 operations_research_constraint_solverPINVOKE.
IntVarLocalSearchFilter_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6, swigDelegate7, swigDelegate8, swigDelegate9);
127 private bool SwigDerivedClassHasMethod(
string methodName, global::System.Type[] methodTypes) {
128 global::System.Reflection.MethodInfo[] methodInfos = this.GetType().GetMethods(
129 global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance);
130 foreach (global::System.Reflection.MethodInfo methodInfo in methodInfos) {
131 if (methodInfo.DeclaringType ==
null)
134 if (methodInfo.Name != methodName)
137 var parameters = methodInfo.GetParameters();
138 if (parameters.Length != methodTypes.Length)
141 bool parametersMatch =
true;
142 for (var i = 0; i < parameters.Length; i++) {
143 if (parameters[i].ParameterType != methodTypes[i]) {
144 parametersMatch =
false;
149 if (!parametersMatch)
152 if (methodInfo.IsVirtual && (methodInfo.DeclaringType.IsSubclassOf(typeof(IntVarLocalSearchFilter))) &&
153 methodInfo.DeclaringType != methodInfo.GetBaseDefinition().DeclaringType) {
161 private string SwigDirectorMethodToString() {
165 private void SwigDirectorMethodRelax(global::System.IntPtr delta, global::System.IntPtr deltadelta) {
166 Relax((delta == global::System.IntPtr.Zero) ?
null :
new Assignment(delta,
false), (deltadelta == global::System.IntPtr.Zero) ?
null :
new Assignment(deltadelta,
false));
169 private void SwigDirectorMethodCommit(global::System.IntPtr delta, global::System.IntPtr deltadelta) {
170 Commit((delta == global::System.IntPtr.Zero) ?
null :
new Assignment(delta,
false), (deltadelta == global::System.IntPtr.Zero) ?
null :
new Assignment(deltadelta,
false));
173 private bool SwigDirectorMethodAccept(global::System.IntPtr delta, global::System.IntPtr deltadelta,
long objective_min,
long objective_max) {
174 return Accept((delta == global::System.IntPtr.Zero) ?
null :
new Assignment(delta,
false), (deltadelta == global::System.IntPtr.Zero) ?
null :
new Assignment(deltadelta,
false), objective_min, objective_max);
177 private bool SwigDirectorMethodIsIncremental() {
181 private void SwigDirectorMethodRevert() {
185 private void SwigDirectorMethodReset() {
189 private long SwigDirectorMethodGetSynchronizedObjectiveValue() {
193 private long SwigDirectorMethodGetAcceptedObjectiveValue() {
197 private void SwigDirectorMethodOnSynchronize(global::System.IntPtr delta) {
198 OnSynchronize((delta == global::System.IntPtr.Zero) ?
null :
new Assignment(delta,
false));
223 private static global::System.Type[] swigMethodTypes0 =
new global::System.Type[] { };
224 private static global::System.Type[] swigMethodTypes1 =
new global::System.Type[] { typeof(
Assignment), typeof(
Assignment) };
225 private static global::System.Type[] swigMethodTypes2 =
new global::System.Type[] { typeof(Assignment), typeof(Assignment) };
226 private static global::System.Type[] swigMethodTypes3 =
new global::System.Type[] { typeof(Assignment), typeof(Assignment), typeof(
long), typeof(
long) };
227 private static global::System.Type[] swigMethodTypes4 =
new global::System.Type[] { };
228 private static global::System.Type[] swigMethodTypes5 =
new global::System.Type[] { };
229 private static global::System.Type[] swigMethodTypes6 =
new global::System.Type[] { };
230 private static global::System.Type[] swigMethodTypes7 =
new global::System.Type[] { };
231 private static global::System.Type[] swigMethodTypes8 =
new global::System.Type[] { };
232 private static global::System.Type[] swigMethodTypes9 =
new global::System.Type[] { typeof(Assignment) };