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 3.0.12
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 
21  internal SequenceVarLocalSearchOperator(global::System.IntPtr cPtr, bool cMemoryOwn) : base(operations_research_constraint_solverPINVOKE.SequenceVarLocalSearchOperator_SWIGUpcast(cPtr), cMemoryOwn) {
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 
30  Dispose();
31  }
32 
33  public override void Dispose() {
34  lock(this) {
35  if (swigCPtr.Handle != global::System.IntPtr.Zero) {
36  if (swigCMemOwn) {
37  swigCMemOwn = false;
39  }
40  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
41  }
42  global::System.GC.SuppressFinalize(this);
43  base.Dispose();
44  }
45  }
46 
47  public SequenceVarLocalSearchOperator() : this(operations_research_constraint_solverPINVOKE.new_SequenceVarLocalSearchOperator__SWIG_0(), true) {
48  SwigDirectorConnect();
49  }
50 
51  public SequenceVarLocalSearchOperator(SequenceVarVector vars) : this(operations_research_constraint_solverPINVOKE.new_SequenceVarLocalSearchOperator__SWIG_1(SequenceVarVector.getCPtr(vars)), true) {
53  SwigDirectorConnect();
54  }
55 
56  public int[] Sequence(long index) {
58  CpIntVector tmpVector = null;
59  if (cPtr != global::System.IntPtr.Zero) {
60  tmpVector = new CpIntVector(cPtr, true);
61  int[] outArray = new int[tmpVector.Count];
62  tmpVector.CopyTo(outArray);
63  return outArray;
64  }
65  return null;
66 }
67 
68  public int[] OldSequence(long index) {
70  CpIntVector tmpVector = null;
71  if (cPtr != global::System.IntPtr.Zero) {
72  tmpVector = new CpIntVector(cPtr, true);
73  int[] outArray = new int[tmpVector.Count];
74  tmpVector.CopyTo(outArray);
75  return outArray;
76  }
77  return null;
78 }
79 
80  private void SwigDirectorConnect() {
81  if (SwigDerivedClassHasMethod("ToString", swigMethodTypes0))
82  swigDelegate0 = new SwigDelegateSequenceVarLocalSearchOperator_0(SwigDirectorToString);
83  if (SwigDerivedClassHasMethod("MakeNextNeighbor", swigMethodTypes1))
84  swigDelegate1 = new SwigDelegateSequenceVarLocalSearchOperator_1(SwigDirectorMakeNextNeighbor);
85  if (SwigDerivedClassHasMethod("Reset", swigMethodTypes2))
86  swigDelegate2 = new SwigDelegateSequenceVarLocalSearchOperator_2(SwigDirectorReset);
87  if (SwigDerivedClassHasMethod("HasFragments", swigMethodTypes3))
88  swigDelegate3 = new SwigDelegateSequenceVarLocalSearchOperator_3(SwigDirectorHasFragments);
89  if (SwigDerivedClassHasMethod("HoldsDelta", swigMethodTypes4))
90  swigDelegate4 = new SwigDelegateSequenceVarLocalSearchOperator_4(SwigDirectorHoldsDelta);
91  if (SwigDerivedClassHasMethod("IsIncremental", swigMethodTypes5))
92  swigDelegate5 = new SwigDelegateSequenceVarLocalSearchOperator_5(SwigDirectorIsIncremental);
93  if (SwigDerivedClassHasMethod("OnStart", swigMethodTypes6))
94  swigDelegate6 = new SwigDelegateSequenceVarLocalSearchOperator_6(SwigDirectorOnStart);
95  operations_research_constraint_solverPINVOKE.SequenceVarLocalSearchOperator_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6);
96  }
97 
98  private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
99  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);
100  bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(SequenceVarLocalSearchOperator));
101  return hasDerivedMethod;
102  }
103 
104  private string SwigDirectorToString() {
105  return ToString();
106  }
107 
108  private bool SwigDirectorMakeNextNeighbor(global::System.IntPtr delta, global::System.IntPtr deltadelta) {
109  return MakeNextNeighbor((delta == global::System.IntPtr.Zero) ? null : new Assignment(delta, false), (deltadelta == global::System.IntPtr.Zero) ? null : new Assignment(deltadelta, false));
110  }
111 
112  private void SwigDirectorReset() {
113  Reset();
114  }
115 
116  private bool SwigDirectorHasFragments() {
117  return HasFragments();
118  }
119 
120  private bool SwigDirectorHoldsDelta() {
121  return HoldsDelta();
122  }
123 
124  private bool SwigDirectorIsIncremental() {
125  return IsIncremental();
126  }
127 
128  private void SwigDirectorOnStart() {
129  OnStart();
130  }
131 
132  public delegate string SwigDelegateSequenceVarLocalSearchOperator_0();
133  public delegate bool SwigDelegateSequenceVarLocalSearchOperator_1(global::System.IntPtr delta, global::System.IntPtr deltadelta);
134  public delegate void SwigDelegateSequenceVarLocalSearchOperator_2();
135  public delegate bool SwigDelegateSequenceVarLocalSearchOperator_3();
136  public delegate bool SwigDelegateSequenceVarLocalSearchOperator_4();
137  public delegate bool SwigDelegateSequenceVarLocalSearchOperator_5();
138  public delegate void SwigDelegateSequenceVarLocalSearchOperator_6();
139 
140  private SwigDelegateSequenceVarLocalSearchOperator_0 swigDelegate0;
141  private SwigDelegateSequenceVarLocalSearchOperator_1 swigDelegate1;
142  private SwigDelegateSequenceVarLocalSearchOperator_2 swigDelegate2;
143  private SwigDelegateSequenceVarLocalSearchOperator_3 swigDelegate3;
144  private SwigDelegateSequenceVarLocalSearchOperator_4 swigDelegate4;
145  private SwigDelegateSequenceVarLocalSearchOperator_5 swigDelegate5;
146  private SwigDelegateSequenceVarLocalSearchOperator_6 swigDelegate6;
147 
148  private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { };
149  private static global::System.Type[] swigMethodTypes1 = new global::System.Type[] { typeof(Assignment), typeof(Assignment) };
150  private static global::System.Type[] swigMethodTypes2 = new global::System.Type[] { };
151  private static global::System.Type[] swigMethodTypes3 = new global::System.Type[] { };
152  private static global::System.Type[] swigMethodTypes4 = new global::System.Type[] { };
153  private static global::System.Type[] swigMethodTypes5 = new global::System.Type[] { };
154  private static global::System.Type[] swigMethodTypes6 = new global::System.Type[] { };
155 }
156 
157 }
virtual bool MakeNextNeighbor(Assignment delta, Assignment deltadelta)
static global::System.IntPtr SequenceVarLocalSearchOperator_OldSequence(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr SequenceVarLocalSearchOperator_Sequence(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void delete_SequenceVarLocalSearchOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr SequenceVarLocalSearchOperator_SWIGUpcast(global::System.IntPtr jarg1)
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)
delegate bool SwigDelegateSequenceVarLocalSearchOperator_1(global::System.IntPtr delta, global::System.IntPtr deltadelta)