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(
"Start", swigMethodTypes1))
155 if (SwigDerivedClassHasMethod(
"Reset", swigMethodTypes2))
157 if (SwigDerivedClassHasMethod(
"HasFragments", swigMethodTypes3))
159 if (SwigDerivedClassHasMethod(
"HoldsDelta", swigMethodTypes4))
161 if (SwigDerivedClassHasMethod(
"IsIncremental", swigMethodTypes5))
163 if (SwigDerivedClassHasMethod(
"SkipUnchanged", swigMethodTypes6))
165 if (SwigDerivedClassHasMethod(
"OnStart", swigMethodTypes7))
167 if (SwigDerivedClassHasMethod(
"MakeOneNeighbor", swigMethodTypes8))
172 private bool SwigDerivedClassHasMethod(
string methodName, global::System.Type[] methodTypes) {
173 global::System.Reflection.MethodInfo[] methodInfos = this.GetType().GetMethods(
174 global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance);
175 foreach (global::System.Reflection.MethodInfo methodInfo in methodInfos) {
176 if (methodInfo.DeclaringType ==
null)
179 if (methodInfo.Name != methodName)
182 var parameters = methodInfo.GetParameters();
183 if (parameters.Length != methodTypes.Length)
186 bool parametersMatch =
true;
187 for (var i = 0; i < parameters.Length; i++) {
188 if (parameters[i].ParameterType != methodTypes[i]) {
189 parametersMatch =
false;
194 if (!parametersMatch)
197 if (methodInfo.IsVirtual && (methodInfo.DeclaringType.IsSubclassOf(typeof(IntVarLocalSearchOperator))) &&
198 methodInfo.DeclaringType != methodInfo.GetBaseDefinition().DeclaringType) {
206 private string SwigDirectorMethodToString() {
210 private void SwigDirectorMethodStart(global::System.IntPtr assignment) {
211 Start((assignment == global::System.IntPtr.Zero) ?
null :
new Assignment(assignment,
false));
214 private void SwigDirectorMethodReset() {
218 private bool SwigDirectorMethodHasFragments() {
222 private bool SwigDirectorMethodHoldsDelta() {
226 private bool SwigDirectorMethodIsIncremental() {
230 private bool SwigDirectorMethodSkipUnchanged(
int index) {
234 private void SwigDirectorMethodOnStart() {
238 private bool SwigDirectorMethodMakeOneNeighbor() {
262 private static global::System.Type[] swigMethodTypes0 =
new global::System.Type[] { };
263 private static global::System.Type[] swigMethodTypes1 =
new global::System.Type[] { typeof(
Assignment) };
264 private static global::System.Type[] swigMethodTypes2 =
new global::System.Type[] { };
265 private static global::System.Type[] swigMethodTypes3 =
new global::System.Type[] { };
266 private static global::System.Type[] swigMethodTypes4 =
new global::System.Type[] { };
267 private static global::System.Type[] swigMethodTypes5 =
new global::System.Type[] { };
268 private static global::System.Type[] swigMethodTypes6 =
new global::System.Type[] { typeof(
int) };
269 private static global::System.Type[] swigMethodTypes7 =
new global::System.Type[] { };
270 private static global::System.Type[] swigMethodTypes8 =
new global::System.Type[] { };