DotNet Reference

.Net Reference

SequenceVarLocalSearchOperator.cs
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 4.0.2
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10 
12 
13 using System;
14 using System.Runtime.InteropServices;
15 using System.Collections;
16 using System.Collections.Generic;
17 
19  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20 
22  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
23  }
24 
25  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SequenceVarLocalSearchOperator obj) {
26  return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
27  }
28 
29  protected override void Dispose(bool disposing) {
30  lock(this) {
31  if (swigCPtr.Handle != global::System.IntPtr.Zero) {
32  if (swigCMemOwn) {
33  swigCMemOwn = false;
35  }
36  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
37  }
38  base.Dispose(disposing);
39  }
40  }
41 
42  public SequenceVarLocalSearchOperator() : this(operations_research_constraint_solverPINVOKE.new_SequenceVarLocalSearchOperator__SWIG_0(), true) {
43  SwigDirectorConnect();
44  }
45 
46  public SequenceVarLocalSearchOperator(SequenceVarVector vars) : this(operations_research_constraint_solverPINVOKE.new_SequenceVarLocalSearchOperator__SWIG_1(SequenceVarVector.getCPtr(vars)), true) {
48  SwigDirectorConnect();
49  }
50 
51  public int[] Sequence(long index) {
53  IntVector tmpVector = null;
54  if (cPtr != global::System.IntPtr.Zero) {
55  tmpVector = new IntVector(cPtr, true);
56  int[] outArray = new int[tmpVector.Count];
57  tmpVector.CopyTo(outArray);
58  return outArray;
59  }
60  return null;
61 }
62 
63  public int[] OldSequence(long index) {
65  IntVector tmpVector = null;
66  if (cPtr != global::System.IntPtr.Zero) {
67  tmpVector = new IntVector(cPtr, true);
68  int[] outArray = new int[tmpVector.Count];
69  tmpVector.CopyTo(outArray);
70  return outArray;
71  }
72  return null;
73 }
74 
75  private void SwigDirectorConnect() {
76  if (SwigDerivedClassHasMethod("ToString", swigMethodTypes0))
77  swigDelegate0 = new SwigDelegateSequenceVarLocalSearchOperator_0(SwigDirectorMethodToString);
78  if (SwigDerivedClassHasMethod("MakeNextNeighbor", swigMethodTypes1))
79  swigDelegate1 = new SwigDelegateSequenceVarLocalSearchOperator_1(SwigDirectorMethodMakeNextNeighbor);
80  if (SwigDerivedClassHasMethod("Reset", swigMethodTypes2))
81  swigDelegate2 = new SwigDelegateSequenceVarLocalSearchOperator_2(SwigDirectorMethodReset);
82  if (SwigDerivedClassHasMethod("HasFragments", swigMethodTypes3))
83  swigDelegate3 = new SwigDelegateSequenceVarLocalSearchOperator_3(SwigDirectorMethodHasFragments);
84  if (SwigDerivedClassHasMethod("HoldsDelta", swigMethodTypes4))
85  swigDelegate4 = new SwigDelegateSequenceVarLocalSearchOperator_4(SwigDirectorMethodHoldsDelta);
86  if (SwigDerivedClassHasMethod("IsIncremental", swigMethodTypes5))
87  swigDelegate5 = new SwigDelegateSequenceVarLocalSearchOperator_5(SwigDirectorMethodIsIncremental);
88  if (SwigDerivedClassHasMethod("OnStart", swigMethodTypes6))
89  swigDelegate6 = new SwigDelegateSequenceVarLocalSearchOperator_6(SwigDirectorMethodOnStart);
90  operations_research_constraint_solverPINVOKE.SequenceVarLocalSearchOperator_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6);
91  }
92 
93  private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
94  global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, methodTypes, null);
95  bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(SequenceVarLocalSearchOperator));
96  return hasDerivedMethod;
97  }
98 
99  private string SwigDirectorMethodToString() {
100  return ToString();
101  }
102 
103  private bool SwigDirectorMethodMakeNextNeighbor(global::System.IntPtr delta, global::System.IntPtr deltadelta) {
104  return MakeNextNeighbor((delta == global::System.IntPtr.Zero) ? null : new Assignment(delta, false), (deltadelta == global::System.IntPtr.Zero) ? null : new Assignment(deltadelta, false));
105  }
106 
107  private void SwigDirectorMethodReset() {
108  Reset();
109  }
110 
111  private bool SwigDirectorMethodHasFragments() {
112  return HasFragments();
113  }
114 
115  private bool SwigDirectorMethodHoldsDelta() {
116  return HoldsDelta();
117  }
118 
119  private bool SwigDirectorMethodIsIncremental() {
120  return IsIncremental();
121  }
122 
123  private void SwigDirectorMethodOnStart() {
124  OnStart();
125  }
126 
128  public delegate bool SwigDelegateSequenceVarLocalSearchOperator_1(global::System.IntPtr delta, global::System.IntPtr deltadelta);
134 
135  private SwigDelegateSequenceVarLocalSearchOperator_0 swigDelegate0;
136  private SwigDelegateSequenceVarLocalSearchOperator_1 swigDelegate1;
137  private SwigDelegateSequenceVarLocalSearchOperator_2 swigDelegate2;
138  private SwigDelegateSequenceVarLocalSearchOperator_3 swigDelegate3;
139  private SwigDelegateSequenceVarLocalSearchOperator_4 swigDelegate4;
140  private SwigDelegateSequenceVarLocalSearchOperator_5 swigDelegate5;
141  private SwigDelegateSequenceVarLocalSearchOperator_6 swigDelegate6;
142 
143  private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { };
144  private static global::System.Type[] swigMethodTypes1 = new global::System.Type[] { typeof(Assignment), typeof(Assignment) };
145  private static global::System.Type[] swigMethodTypes2 = new global::System.Type[] { };
146  private static global::System.Type[] swigMethodTypes3 = new global::System.Type[] { };
147  private static global::System.Type[] swigMethodTypes4 = new global::System.Type[] { };
148  private static global::System.Type[] swigMethodTypes5 = new global::System.Type[] { };
149  private static global::System.Type[] swigMethodTypes6 = new global::System.Type[] { };
150 }
151 
152 }
delegate bool SwigDelegateSequenceVarLocalSearchOperator_1(global::System.IntPtr delta, global::System.IntPtr deltadelta)
delegate bool SwigDelegateSequenceVarLocalSearchOperator_3()
static global::System.IntPtr SequenceVarLocalSearchOperator_Sequence(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static bool Pending
virtual bool MakeNextNeighbor(Assignment delta, Assignment deltadelta)
int Count
int[] Sequence(long index)
virtual void OnStart()
static void delete_SequenceVarLocalSearchOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
delegate void SwigDelegateSequenceVarLocalSearchOperator_2()
using System
Definition: Program.cs:14
delegate bool SwigDelegateSequenceVarLocalSearchOperator_5()
delegate void SwigDelegateSequenceVarLocalSearchOperator_6()
override void Dispose(bool disposing)
virtual void Reset()
int[] OldSequence(long index)
void CopyTo(int[] array)
virtual bool IsIncremental()
bool swigCMemOwn
Definition: BaseObject.cs:20
SequenceVarLocalSearchOperator()
static global::System.IntPtr SequenceVarLocalSearchOperator_OldSequence(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
SequenceVarLocalSearchOperator(SequenceVarVector vars)
Definition: Assignment.cs:18
delegate string SwigDelegateSequenceVarLocalSearchOperator_0()
virtual string ToString()
Definition: BaseObject.cs:55
delegate bool SwigDelegateSequenceVarLocalSearchOperator_4()
virtual bool HasFragments()
static global::System.Exception Retrieve()
static global::System.IntPtr SequenceVarLocalSearchOperator_SWIGUpcast(global::System.IntPtr jarg1)
override bool HoldsDelta()
static void SequenceVarLocalSearchOperator_director_connect(global::System.Runtime.InteropServices.HandleRef jarg1, SequenceVarLocalSearchOperator.SwigDelegateSequenceVarLocalSearchOperator_0 delegate0, SequenceVarLocalSearchOperator.SwigDelegateSequenceVarLocalSearchOperator_1 delegate1, SequenceVarLocalSearchOperator.SwigDelegateSequenceVarLocalSearchOperator_2 delegate2, SequenceVarLocalSearchOperator.SwigDelegateSequenceVarLocalSearchOperator_3 delegate3, SequenceVarLocalSearchOperator.SwigDelegateSequenceVarLocalSearchOperator_4 delegate4, SequenceVarLocalSearchOperator.SwigDelegateSequenceVarLocalSearchOperator_5 delegate5, SequenceVarLocalSearchOperator.SwigDelegateSequenceVarLocalSearchOperator_6 delegate6)