DotNet Reference

DotNet Reference

PathOperator.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 
18 public partial class PathOperator : IntVarLocalSearchOperator {
19  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20 
21  internal PathOperator(global::System.IntPtr cPtr, bool cMemoryOwn) : base(operations_research_constraint_solverPINVOKE.PathOperator_SWIGUpcast(cPtr), cMemoryOwn) {
22  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
23  }
24 
25  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PathOperator obj) {
26  return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
27  }
28 
29  ~PathOperator() {
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  // Keep reference to delegate to avoid GC to collect them early
48  private List<LongToInt> startEmptyPathCallbacks;
49  private LongToInt StoreLongToInt(LongToInt path) {
50  if (startEmptyPathCallbacks == null)
51  startEmptyPathCallbacks = new List<LongToInt>();
52  startEmptyPathCallbacks.Add(path);
53  return path;
54  }
55 
56  public virtual bool MakeNeighbor() {
58  return ret;
59  }
60 
61  public override void Reset() {
63  }
64 
65  public long Prev(long node) {
67  return ret;
68  }
69 
70  protected virtual new bool MakeOneNeighbor() {
72  return ret;
73  }
74 
75  protected virtual void OnNodeInitialization() {
77  }
78 
79  protected virtual bool RestartAtPathStartOnSynchronize() {
81  return ret;
82  }
83 
84  protected virtual bool OnSamePathAsPreviousBase(long base_index) {
85  bool ret = (SwigDerivedClassHasMethod("OnSamePathAsPreviousBase", swigMethodTypes10) ? operations_research_constraint_solverPINVOKE.PathOperator_OnSamePathAsPreviousBaseSwigExplicitPathOperator(swigCPtr, base_index) : operations_research_constraint_solverPINVOKE.PathOperator_OnSamePathAsPreviousBase(swigCPtr, base_index));
86  return ret;
87  }
88 
89  protected virtual long GetBaseNodeRestartPosition(int base_index) {
90  long ret = (SwigDerivedClassHasMethod("GetBaseNodeRestartPosition", swigMethodTypes11) ? operations_research_constraint_solverPINVOKE.PathOperator_GetBaseNodeRestartPositionSwigExplicitPathOperator(swigCPtr, base_index) : operations_research_constraint_solverPINVOKE.PathOperator_GetBaseNodeRestartPosition(swigCPtr, base_index));
91  return ret;
92  }
93 
94  protected virtual void SetNextBaseToIncrement(long base_index) {
95  if (SwigDerivedClassHasMethod("SetNextBaseToIncrement", swigMethodTypes12)) operations_research_constraint_solverPINVOKE.PathOperator_SetNextBaseToIncrementSwigExplicitPathOperator(swigCPtr, base_index); else operations_research_constraint_solverPINVOKE.PathOperator_SetNextBaseToIncrement(swigCPtr, base_index);
96  }
97 
98  protected virtual bool ConsiderAlternatives(long base_index) {
99  bool ret = (SwigDerivedClassHasMethod("ConsiderAlternatives", swigMethodTypes13) ? operations_research_constraint_solverPINVOKE.PathOperator_ConsiderAlternativesSwigExplicitPathOperator(swigCPtr, base_index) : operations_research_constraint_solverPINVOKE.PathOperator_ConsiderAlternatives(swigCPtr, base_index));
100  return ret;
101  }
102 
103  protected virtual bool InitPosition() {
104  bool ret = (SwigDerivedClassHasMethod("InitPosition", swigMethodTypes14) ? operations_research_constraint_solverPINVOKE.PathOperator_InitPositionSwigExplicitPathOperator(swigCPtr) : operations_research_constraint_solverPINVOKE.PathOperator_InitPosition(swigCPtr));
105  return ret;
106  }
107 
108  private void SwigDirectorConnect() {
109  if (SwigDerivedClassHasMethod("ToString", swigMethodTypes0))
110  swigDelegate0 = new SwigDelegatePathOperator_0(SwigDirectorToString);
111  if (SwigDerivedClassHasMethod("Reset", swigMethodTypes1))
112  swigDelegate1 = new SwigDelegatePathOperator_1(SwigDirectorReset);
113  if (SwigDerivedClassHasMethod("HasFragments", swigMethodTypes2))
114  swigDelegate2 = new SwigDelegatePathOperator_2(SwigDirectorHasFragments);
115  if (SwigDerivedClassHasMethod("HoldsDelta", swigMethodTypes3))
116  swigDelegate3 = new SwigDelegatePathOperator_3(SwigDirectorHoldsDelta);
117  if (SwigDerivedClassHasMethod("IsIncremental", swigMethodTypes4))
118  swigDelegate4 = new SwigDelegatePathOperator_4(SwigDirectorIsIncremental);
119  if (SwigDerivedClassHasMethod("OnStart", swigMethodTypes5))
120  swigDelegate5 = new SwigDelegatePathOperator_5(SwigDirectorOnStart);
121  if (SwigDerivedClassHasMethod("MakeOneNeighbor", swigMethodTypes6))
122  swigDelegate6 = new SwigDelegatePathOperator_6(SwigDirectorMakeOneNeighbor);
123  if (SwigDerivedClassHasMethod("MakeNeighbor", swigMethodTypes7))
124  swigDelegate7 = new SwigDelegatePathOperator_7(SwigDirectorMakeNeighbor);
125  if (SwigDerivedClassHasMethod("OnNodeInitialization", swigMethodTypes8))
126  swigDelegate8 = new SwigDelegatePathOperator_8(SwigDirectorOnNodeInitialization);
127  if (SwigDerivedClassHasMethod("RestartAtPathStartOnSynchronize", swigMethodTypes9))
128  swigDelegate9 = new SwigDelegatePathOperator_9(SwigDirectorRestartAtPathStartOnSynchronize);
129  if (SwigDerivedClassHasMethod("OnSamePathAsPreviousBase", swigMethodTypes10))
130  swigDelegate10 = new SwigDelegatePathOperator_10(SwigDirectorOnSamePathAsPreviousBase);
131  if (SwigDerivedClassHasMethod("GetBaseNodeRestartPosition", swigMethodTypes11))
132  swigDelegate11 = new SwigDelegatePathOperator_11(SwigDirectorGetBaseNodeRestartPosition);
133  if (SwigDerivedClassHasMethod("SetNextBaseToIncrement", swigMethodTypes12))
134  swigDelegate12 = new SwigDelegatePathOperator_12(SwigDirectorSetNextBaseToIncrement);
135  if (SwigDerivedClassHasMethod("ConsiderAlternatives", swigMethodTypes13))
136  swigDelegate13 = new SwigDelegatePathOperator_13(SwigDirectorConsiderAlternatives);
137  if (SwigDerivedClassHasMethod("InitPosition", swigMethodTypes14))
138  swigDelegate14 = new SwigDelegatePathOperator_14(SwigDirectorInitPosition);
139  operations_research_constraint_solverPINVOKE.PathOperator_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6, swigDelegate7, swigDelegate8, swigDelegate9, swigDelegate10, swigDelegate11, swigDelegate12, swigDelegate13, swigDelegate14);
140  }
141 
142  private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
143  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);
144  bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(PathOperator));
145  return hasDerivedMethod;
146  }
147 
148  private string SwigDirectorToString() {
149  return ToString();
150  }
151 
152  private void SwigDirectorReset() {
153  Reset();
154  }
155 
156  private bool SwigDirectorHasFragments() {
157  return HasFragments();
158  }
159 
160  private bool SwigDirectorHoldsDelta() {
161  return HoldsDelta();
162  }
163 
164  private bool SwigDirectorIsIncremental() {
165  return IsIncremental();
166  }
167 
168  private void SwigDirectorOnStart() {
169  OnStart();
170  }
171 
172  private bool SwigDirectorMakeOneNeighbor() {
173  return MakeOneNeighbor();
174  }
175 
176  private bool SwigDirectorMakeNeighbor() {
177  return MakeNeighbor();
178  }
179 
180  private void SwigDirectorOnNodeInitialization() {
182  }
183 
184  private bool SwigDirectorRestartAtPathStartOnSynchronize() {
186  }
187 
188  private bool SwigDirectorOnSamePathAsPreviousBase(long base_index) {
189  return OnSamePathAsPreviousBase(base_index);
190  }
191 
192  private long SwigDirectorGetBaseNodeRestartPosition(int base_index) {
193  return GetBaseNodeRestartPosition(base_index);
194  }
195 
196  private void SwigDirectorSetNextBaseToIncrement(long base_index) {
197  SetNextBaseToIncrement(base_index);
198  }
199 
200  private bool SwigDirectorConsiderAlternatives(long base_index) {
201  return ConsiderAlternatives(base_index);
202  }
203 
204  private bool SwigDirectorInitPosition() {
205  return InitPosition();
206  }
207 
208  public delegate string SwigDelegatePathOperator_0();
209  public delegate void SwigDelegatePathOperator_1();
210  public delegate bool SwigDelegatePathOperator_2();
211  public delegate bool SwigDelegatePathOperator_3();
212  public delegate bool SwigDelegatePathOperator_4();
213  public delegate void SwigDelegatePathOperator_5();
214  public delegate bool SwigDelegatePathOperator_6();
215  public delegate bool SwigDelegatePathOperator_7();
216  public delegate void SwigDelegatePathOperator_8();
217  public delegate bool SwigDelegatePathOperator_9();
218  public delegate bool SwigDelegatePathOperator_10(long base_index);
219  public delegate long SwigDelegatePathOperator_11(int base_index);
220  public delegate void SwigDelegatePathOperator_12(long base_index);
221  public delegate bool SwigDelegatePathOperator_13(long base_index);
222  public delegate bool SwigDelegatePathOperator_14();
223 
224  private SwigDelegatePathOperator_0 swigDelegate0;
225  private SwigDelegatePathOperator_1 swigDelegate1;
226  private SwigDelegatePathOperator_2 swigDelegate2;
227  private SwigDelegatePathOperator_3 swigDelegate3;
228  private SwigDelegatePathOperator_4 swigDelegate4;
229  private SwigDelegatePathOperator_5 swigDelegate5;
230  private SwigDelegatePathOperator_6 swigDelegate6;
231  private SwigDelegatePathOperator_7 swigDelegate7;
232  private SwigDelegatePathOperator_8 swigDelegate8;
233  private SwigDelegatePathOperator_9 swigDelegate9;
234  private SwigDelegatePathOperator_10 swigDelegate10;
235  private SwigDelegatePathOperator_11 swigDelegate11;
236  private SwigDelegatePathOperator_12 swigDelegate12;
237  private SwigDelegatePathOperator_13 swigDelegate13;
238  private SwigDelegatePathOperator_14 swigDelegate14;
239 
240  private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { };
241  private static global::System.Type[] swigMethodTypes1 = new global::System.Type[] { };
242  private static global::System.Type[] swigMethodTypes2 = new global::System.Type[] { };
243  private static global::System.Type[] swigMethodTypes3 = new global::System.Type[] { };
244  private static global::System.Type[] swigMethodTypes4 = new global::System.Type[] { };
245  private static global::System.Type[] swigMethodTypes5 = new global::System.Type[] { };
246  private static global::System.Type[] swigMethodTypes6 = new global::System.Type[] { };
247  private static global::System.Type[] swigMethodTypes7 = new global::System.Type[] { };
248  private static global::System.Type[] swigMethodTypes8 = new global::System.Type[] { };
249  private static global::System.Type[] swigMethodTypes9 = new global::System.Type[] { };
250  private static global::System.Type[] swigMethodTypes10 = new global::System.Type[] { typeof(long) };
251  private static global::System.Type[] swigMethodTypes11 = new global::System.Type[] { typeof(int) };
252  private static global::System.Type[] swigMethodTypes12 = new global::System.Type[] { typeof(long) };
253  private static global::System.Type[] swigMethodTypes13 = new global::System.Type[] { typeof(long) };
254  private static global::System.Type[] swigMethodTypes14 = new global::System.Type[] { };
255 }
256 
257 }
static void PathOperator_SetNextBaseToIncrementSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
Definition: PathOperator.cs:18
delegate int LongToInt(long t)
static bool PathOperator_MakeOneNeighbor(global::System.Runtime.InteropServices.HandleRef jarg1)
virtual long GetBaseNodeRestartPosition(int base_index)
Definition: PathOperator.cs:89
static bool PathOperator_ConsiderAlternativesSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
delegate void SwigDelegatePathOperator_5()
delegate bool SwigDelegatePathOperator_10(long base_index)
static bool PathOperator_InitPositionSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
delegate bool SwigDelegatePathOperator_7()
static long PathOperator_GetBaseNodeRestartPositionSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
virtual void SetNextBaseToIncrement(long base_index)
Definition: PathOperator.cs:94
virtual bool RestartAtPathStartOnSynchronize()
Definition: PathOperator.cs:79
static long PathOperator_Prev(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
delegate bool SwigDelegatePathOperator_9()
long Prev(long node)
Definition: PathOperator.cs:65
Definition: Assignment.cs:11
static void PathOperator_director_connect(global::System.Runtime.InteropServices.HandleRef jarg1, PathOperator.SwigDelegatePathOperator_0 delegate0, PathOperator.SwigDelegatePathOperator_1 delegate1, PathOperator.SwigDelegatePathOperator_2 delegate2, PathOperator.SwigDelegatePathOperator_3 delegate3, PathOperator.SwigDelegatePathOperator_4 delegate4, PathOperator.SwigDelegatePathOperator_5 delegate5, PathOperator.SwigDelegatePathOperator_6 delegate6, PathOperator.SwigDelegatePathOperator_7 delegate7, PathOperator.SwigDelegatePathOperator_8 delegate8, PathOperator.SwigDelegatePathOperator_9 delegate9, PathOperator.SwigDelegatePathOperator_10 delegate10, PathOperator.SwigDelegatePathOperator_11 delegate11, PathOperator.SwigDelegatePathOperator_12 delegate12, PathOperator.SwigDelegatePathOperator_13 delegate13, PathOperator.SwigDelegatePathOperator_14 delegate14)
delegate void SwigDelegatePathOperator_1()
delegate long SwigDelegatePathOperator_11(int base_index)
static bool PathOperator_ConsiderAlternatives(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void PathOperator_SetNextBaseToIncrement(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
virtual bool InitPosition()
virtual bool IsIncremental()
delegate string SwigDelegatePathOperator_0()
static void PathOperator_OnNodeInitializationSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PathOperator_OnSamePathAsPreviousBase(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
delegate void SwigDelegatePathOperator_8()
delegate bool SwigDelegatePathOperator_14()
static bool PathOperator_RestartAtPathStartOnSynchronize(global::System.Runtime.InteropServices.HandleRef jarg1)
virtual new bool MakeOneNeighbor()
Definition: PathOperator.cs:70
virtual bool OnSamePathAsPreviousBase(long base_index)
Definition: PathOperator.cs:84
delegate bool SwigDelegatePathOperator_4()
static void PathOperator_Reset(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr PathOperator_SWIGUpcast(global::System.IntPtr jarg1)
override void Reset()
Definition: PathOperator.cs:61
delegate bool SwigDelegatePathOperator_2()
bool swigCMemOwn
Definition: BaseObject.cs:20
override void Dispose()
Definition: PathOperator.cs:33
static long PathOperator_GetBaseNodeRestartPosition(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
virtual bool ConsiderAlternatives(long base_index)
Definition: PathOperator.cs:98
static bool PathOperator_OnSamePathAsPreviousBaseSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static bool PathOperator_RestartAtPathStartOnSynchronizeSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
delegate bool SwigDelegatePathOperator_13(long base_index)
virtual void OnNodeInitialization()
Definition: PathOperator.cs:75
static void PathOperator_OnNodeInitialization(global::System.Runtime.InteropServices.HandleRef jarg1)
virtual void OnStart()
static void PathOperator_ResetSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
static void delete_PathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
virtual string ToString()
Definition: BaseObject.cs:51
virtual bool HasFragments()
delegate bool SwigDelegatePathOperator_3()
virtual bool MakeNeighbor()
Definition: PathOperator.cs:56
delegate void SwigDelegatePathOperator_12(long base_index)
delegate bool SwigDelegatePathOperator_6()
static bool PathOperator_MakeNeighbor(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PathOperator_MakeOneNeighborSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PathOperator_InitPosition(global::System.Runtime.InteropServices.HandleRef jarg1)
override bool HoldsDelta()