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(IntVarLocalSearchOperator 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);
55 public IntVarLocalSearchOperator(IntVarVector vars,
bool keep_inverse_values) : this(operations_research_constraint_solverPINVOKE.new_IntVarLocalSearchOperator__SWIG_0(IntVarVector.getCPtr(vars), keep_inverse_values), true) {
56 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending)
throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
57 SwigDirectorConnect();
62 SwigDirectorConnect();
84 public long Value(
long index) {
91 IntVar ret = (cPtr == global::System.IntPtr.Zero) ?
null : new
IntVar(cPtr, false);
110 public void SetValue(
long index,
long value) {
141 public virtual void OnStart() {
150 private void SwigDirectorConnect() {
151 if (SwigDerivedClassHasMethod(
"ToString", swigMethodTypes0))
153 if (SwigDerivedClassHasMethod(
"EnterSearch", swigMethodTypes1))
155 if (SwigDerivedClassHasMethod(
"Start", swigMethodTypes2))
157 if (SwigDerivedClassHasMethod(
"Reset", swigMethodTypes3))
159 if (SwigDerivedClassHasMethod(
"HasFragments", swigMethodTypes4))
161 if (SwigDerivedClassHasMethod(
"HoldsDelta", swigMethodTypes5))
163 if (SwigDerivedClassHasMethod(
"IsIncremental", swigMethodTypes6))
165 if (SwigDerivedClassHasMethod(
"SkipUnchanged", swigMethodTypes7))
167 if (SwigDerivedClassHasMethod(
"OnStart", swigMethodTypes8))
169 if (SwigDerivedClassHasMethod(
"MakeOneNeighbor", swigMethodTypes9))
171 operations_research_constraint_solverPINVOKE.
IntVarLocalSearchOperator_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6, swigDelegate7, swigDelegate8, swigDelegate9);
174 private bool SwigDerivedClassHasMethod(
string methodName, global::System.Type[] methodTypes) {
175 global::System.Reflection.MethodInfo[] methodInfos = this.GetType().GetMethods(
176 global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance);
177 foreach (global::System.Reflection.MethodInfo methodInfo in methodInfos) {
178 if (methodInfo.DeclaringType ==
null)
181 if (methodInfo.Name != methodName)
184 var parameters = methodInfo.GetParameters();
185 if (parameters.Length != methodTypes.Length)
188 bool parametersMatch =
true;
189 for (var i = 0; i < parameters.Length; i++) {
190 if (parameters[i].ParameterType != methodTypes[i]) {
191 parametersMatch =
false;
196 if (!parametersMatch)
199 if (methodInfo.IsVirtual && (methodInfo.DeclaringType.IsSubclassOf(typeof(IntVarLocalSearchOperator))) &&
200 methodInfo.DeclaringType != methodInfo.GetBaseDefinition().DeclaringType) {
208 private string SwigDirectorMethodToString() {
212 private void SwigDirectorMethodEnterSearch() {
216 private void SwigDirectorMethodStart(global::System.IntPtr assignment) {
217 Start((assignment == global::System.IntPtr.Zero) ?
null :
new Assignment(assignment,
false));
220 private void SwigDirectorMethodReset() {
224 private bool SwigDirectorMethodHasFragments() {
228 private bool SwigDirectorMethodHoldsDelta() {
232 private bool SwigDirectorMethodIsIncremental() {
236 private bool SwigDirectorMethodSkipUnchanged(
int arg0) {
240 private void SwigDirectorMethodOnStart() {
244 private bool SwigDirectorMethodMakeOneNeighbor() {
270 private static global::System.Type[] swigMethodTypes0 =
new global::System.Type[] { };
271 private static global::System.Type[] swigMethodTypes1 =
new global::System.Type[] { };
272 private static global::System.Type[] swigMethodTypes2 =
new global::System.Type[] { typeof(Assignment) };
273 private static global::System.Type[] swigMethodTypes3 =
new global::System.Type[] { };
274 private static global::System.Type[] swigMethodTypes4 =
new global::System.Type[] { };
275 private static global::System.Type[] swigMethodTypes5 =
new global::System.Type[] { };
276 private static global::System.Type[] swigMethodTypes6 =
new global::System.Type[] { };
277 private static global::System.Type[] swigMethodTypes7 =
new global::System.Type[] { typeof(
int) };
278 private static global::System.Type[] swigMethodTypes8 =
new global::System.Type[] { };
279 private static global::System.Type[] swigMethodTypes9 =
new global::System.Type[] { };