DotNet Reference

.Net 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 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
13using System;
14using System.Runtime.InteropServices;
15using System.Collections;
16using System.Collections.Generic;
17
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 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 // Keep reference to delegate to avoid GC to collect them early
43 private List<LongToInt> startEmptyPathCallbacks;
44 private LongToInt StoreLongToInt(LongToInt path) {
45 if (startEmptyPathCallbacks == null)
46 startEmptyPathCallbacks = new List<LongToInt>();
47 startEmptyPathCallbacks.Add(path);
48 return path;
49 }
50
51 public virtual bool MakeNeighbor() {
53 return ret;
54 }
55
56 public override void Reset() {
58 }
59
60 public long Prev(long node) {
62 return ret;
63 }
64
65 protected virtual new bool MakeOneNeighbor() {
67 return ret;
68 }
69
70 protected virtual void OnNodeInitialization() {
72 }
73
74 protected virtual bool RestartAtPathStartOnSynchronize() {
76 return ret;
77 }
78
79 protected virtual bool OnSamePathAsPreviousBase(long base_index) {
80 bool ret = (SwigDerivedClassHasMethod("OnSamePathAsPreviousBase", swigMethodTypes10) ? operations_research_constraint_solverPINVOKE.PathOperator_OnSamePathAsPreviousBaseSwigExplicitPathOperator(swigCPtr, base_index) : operations_research_constraint_solverPINVOKE.PathOperator_OnSamePathAsPreviousBase(swigCPtr, base_index));
81 return ret;
82 }
83
84 protected virtual long GetBaseNodeRestartPosition(int base_index) {
85 long ret = (SwigDerivedClassHasMethod("GetBaseNodeRestartPosition", swigMethodTypes11) ? operations_research_constraint_solverPINVOKE.PathOperator_GetBaseNodeRestartPositionSwigExplicitPathOperator(swigCPtr, base_index) : operations_research_constraint_solverPINVOKE.PathOperator_GetBaseNodeRestartPosition(swigCPtr, base_index));
86 return ret;
87 }
88
89 protected virtual void SetNextBaseToIncrement(long base_index) {
90 if (SwigDerivedClassHasMethod("SetNextBaseToIncrement", swigMethodTypes12)) operations_research_constraint_solverPINVOKE.PathOperator_SetNextBaseToIncrementSwigExplicitPathOperator(swigCPtr, base_index); else operations_research_constraint_solverPINVOKE.PathOperator_SetNextBaseToIncrement(swigCPtr, base_index);
91 }
92
93 protected virtual bool ConsiderAlternatives(long base_index) {
94 bool ret = (SwigDerivedClassHasMethod("ConsiderAlternatives", swigMethodTypes13) ? operations_research_constraint_solverPINVOKE.PathOperator_ConsiderAlternativesSwigExplicitPathOperator(swigCPtr, base_index) : operations_research_constraint_solverPINVOKE.PathOperator_ConsiderAlternatives(swigCPtr, base_index));
95 return ret;
96 }
97
98 protected virtual bool InitPosition() {
100 return ret;
101 }
102
103 private void SwigDirectorConnect() {
104 if (SwigDerivedClassHasMethod("ToString", swigMethodTypes0))
105 swigDelegate0 = new SwigDelegatePathOperator_0(SwigDirectorMethodToString);
106 if (SwigDerivedClassHasMethod("Reset", swigMethodTypes1))
107 swigDelegate1 = new SwigDelegatePathOperator_1(SwigDirectorMethodReset);
108 if (SwigDerivedClassHasMethod("HasFragments", swigMethodTypes2))
109 swigDelegate2 = new SwigDelegatePathOperator_2(SwigDirectorMethodHasFragments);
110 if (SwigDerivedClassHasMethod("HoldsDelta", swigMethodTypes3))
111 swigDelegate3 = new SwigDelegatePathOperator_3(SwigDirectorMethodHoldsDelta);
112 if (SwigDerivedClassHasMethod("IsIncremental", swigMethodTypes4))
113 swigDelegate4 = new SwigDelegatePathOperator_4(SwigDirectorMethodIsIncremental);
114 if (SwigDerivedClassHasMethod("OnStart", swigMethodTypes5))
115 swigDelegate5 = new SwigDelegatePathOperator_5(SwigDirectorMethodOnStart);
116 if (SwigDerivedClassHasMethod("MakeOneNeighbor", swigMethodTypes6))
117 swigDelegate6 = new SwigDelegatePathOperator_6(SwigDirectorMethodMakeOneNeighbor);
118 if (SwigDerivedClassHasMethod("MakeNeighbor", swigMethodTypes7))
119 swigDelegate7 = new SwigDelegatePathOperator_7(SwigDirectorMethodMakeNeighbor);
120 if (SwigDerivedClassHasMethod("OnNodeInitialization", swigMethodTypes8))
121 swigDelegate8 = new SwigDelegatePathOperator_8(SwigDirectorMethodOnNodeInitialization);
122 if (SwigDerivedClassHasMethod("RestartAtPathStartOnSynchronize", swigMethodTypes9))
123 swigDelegate9 = new SwigDelegatePathOperator_9(SwigDirectorMethodRestartAtPathStartOnSynchronize);
124 if (SwigDerivedClassHasMethod("OnSamePathAsPreviousBase", swigMethodTypes10))
125 swigDelegate10 = new SwigDelegatePathOperator_10(SwigDirectorMethodOnSamePathAsPreviousBase);
126 if (SwigDerivedClassHasMethod("GetBaseNodeRestartPosition", swigMethodTypes11))
127 swigDelegate11 = new SwigDelegatePathOperator_11(SwigDirectorMethodGetBaseNodeRestartPosition);
128 if (SwigDerivedClassHasMethod("SetNextBaseToIncrement", swigMethodTypes12))
129 swigDelegate12 = new SwigDelegatePathOperator_12(SwigDirectorMethodSetNextBaseToIncrement);
130 if (SwigDerivedClassHasMethod("ConsiderAlternatives", swigMethodTypes13))
131 swigDelegate13 = new SwigDelegatePathOperator_13(SwigDirectorMethodConsiderAlternatives);
132 if (SwigDerivedClassHasMethod("InitPosition", swigMethodTypes14))
133 swigDelegate14 = new SwigDelegatePathOperator_14(SwigDirectorMethodInitPosition);
134 operations_research_constraint_solverPINVOKE.PathOperator_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6, swigDelegate7, swigDelegate8, swigDelegate9, swigDelegate10, swigDelegate11, swigDelegate12, swigDelegate13, swigDelegate14);
135 }
136
137 private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
138 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);
139 bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(PathOperator));
140 return hasDerivedMethod;
141 }
142
143 private string SwigDirectorMethodToString() {
144 return ToString();
145 }
146
147 private void SwigDirectorMethodReset() {
148 Reset();
149 }
150
151 private bool SwigDirectorMethodHasFragments() {
152 return HasFragments();
153 }
154
155 private bool SwigDirectorMethodHoldsDelta() {
156 return HoldsDelta();
157 }
158
159 private bool SwigDirectorMethodIsIncremental() {
160 return IsIncremental();
161 }
162
163 private void SwigDirectorMethodOnStart() {
164 OnStart();
165 }
166
167 private bool SwigDirectorMethodMakeOneNeighbor() {
168 return MakeOneNeighbor();
169 }
170
171 private bool SwigDirectorMethodMakeNeighbor() {
172 return MakeNeighbor();
173 }
174
175 private void SwigDirectorMethodOnNodeInitialization() {
177 }
178
179 private bool SwigDirectorMethodRestartAtPathStartOnSynchronize() {
181 }
182
183 private bool SwigDirectorMethodOnSamePathAsPreviousBase(long base_index) {
184 return OnSamePathAsPreviousBase(base_index);
185 }
186
187 private long SwigDirectorMethodGetBaseNodeRestartPosition(int base_index) {
188 return GetBaseNodeRestartPosition(base_index);
189 }
190
191 private void SwigDirectorMethodSetNextBaseToIncrement(long base_index) {
192 SetNextBaseToIncrement(base_index);
193 }
194
195 private bool SwigDirectorMethodConsiderAlternatives(long base_index) {
196 return ConsiderAlternatives(base_index);
197 }
198
199 private bool SwigDirectorMethodInitPosition() {
200 return InitPosition();
201 }
202
203 public delegate string SwigDelegatePathOperator_0();
204 public delegate void SwigDelegatePathOperator_1();
205 public delegate bool SwigDelegatePathOperator_2();
206 public delegate bool SwigDelegatePathOperator_3();
207 public delegate bool SwigDelegatePathOperator_4();
208 public delegate void SwigDelegatePathOperator_5();
209 public delegate bool SwigDelegatePathOperator_6();
210 public delegate bool SwigDelegatePathOperator_7();
211 public delegate void SwigDelegatePathOperator_8();
212 public delegate bool SwigDelegatePathOperator_9();
213 public delegate bool SwigDelegatePathOperator_10(long base_index);
214 public delegate long SwigDelegatePathOperator_11(int base_index);
215 public delegate void SwigDelegatePathOperator_12(long base_index);
216 public delegate bool SwigDelegatePathOperator_13(long base_index);
217 public delegate bool SwigDelegatePathOperator_14();
218
219 private SwigDelegatePathOperator_0 swigDelegate0;
220 private SwigDelegatePathOperator_1 swigDelegate1;
221 private SwigDelegatePathOperator_2 swigDelegate2;
222 private SwigDelegatePathOperator_3 swigDelegate3;
223 private SwigDelegatePathOperator_4 swigDelegate4;
224 private SwigDelegatePathOperator_5 swigDelegate5;
225 private SwigDelegatePathOperator_6 swigDelegate6;
226 private SwigDelegatePathOperator_7 swigDelegate7;
227 private SwigDelegatePathOperator_8 swigDelegate8;
228 private SwigDelegatePathOperator_9 swigDelegate9;
229 private SwigDelegatePathOperator_10 swigDelegate10;
230 private SwigDelegatePathOperator_11 swigDelegate11;
231 private SwigDelegatePathOperator_12 swigDelegate12;
232 private SwigDelegatePathOperator_13 swigDelegate13;
233 private SwigDelegatePathOperator_14 swigDelegate14;
234
235 private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { };
236 private static global::System.Type[] swigMethodTypes1 = new global::System.Type[] { };
237 private static global::System.Type[] swigMethodTypes2 = new global::System.Type[] { };
238 private static global::System.Type[] swigMethodTypes3 = new global::System.Type[] { };
239 private static global::System.Type[] swigMethodTypes4 = new global::System.Type[] { };
240 private static global::System.Type[] swigMethodTypes5 = new global::System.Type[] { };
241 private static global::System.Type[] swigMethodTypes6 = new global::System.Type[] { };
242 private static global::System.Type[] swigMethodTypes7 = new global::System.Type[] { };
243 private static global::System.Type[] swigMethodTypes8 = new global::System.Type[] { };
244 private static global::System.Type[] swigMethodTypes9 = new global::System.Type[] { };
245 private static global::System.Type[] swigMethodTypes10 = new global::System.Type[] { typeof(long) };
246 private static global::System.Type[] swigMethodTypes11 = new global::System.Type[] { typeof(int) };
247 private static global::System.Type[] swigMethodTypes12 = new global::System.Type[] { typeof(long) };
248 private static global::System.Type[] swigMethodTypes13 = new global::System.Type[] { typeof(long) };
249 private static global::System.Type[] swigMethodTypes14 = new global::System.Type[] { };
250}
251
252}
virtual bool OnSamePathAsPreviousBase(long base_index)
Definition: PathOperator.cs:79
override void Dispose(bool disposing)
Definition: PathOperator.cs:29
delegate bool SwigDelegatePathOperator_10(long base_index)
delegate void SwigDelegatePathOperator_12(long base_index)
virtual long GetBaseNodeRestartPosition(int base_index)
Definition: PathOperator.cs:84
virtual void SetNextBaseToIncrement(long base_index)
Definition: PathOperator.cs:89
delegate long SwigDelegatePathOperator_11(int base_index)
virtual bool ConsiderAlternatives(long base_index)
Definition: PathOperator.cs:93
delegate bool SwigDelegatePathOperator_13(long base_index)
static bool PathOperator_ConsiderAlternativesSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static bool PathOperator_OnSamePathAsPreviousBaseSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void PathOperator_OnNodeInitializationSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr PathOperator_SWIGUpcast(global::System.IntPtr jarg1)
static bool PathOperator_RestartAtPathStartOnSynchronizeSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
static void PathOperator_ResetSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
static void PathOperator_OnNodeInitialization(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PathOperator_OnSamePathAsPreviousBase(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void PathOperator_Reset(global::System.Runtime.InteropServices.HandleRef jarg1)
static long PathOperator_GetBaseNodeRestartPosition(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static bool PathOperator_InitPositionSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PathOperator_MakeOneNeighbor(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PathOperator_ConsiderAlternatives(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void delete_PathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PathOperator_MakeOneNeighborSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1)
static void PathOperator_SetNextBaseToIncrement(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static long PathOperator_GetBaseNodeRestartPositionSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static bool PathOperator_RestartAtPathStartOnSynchronize(global::System.Runtime.InteropServices.HandleRef jarg1)
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)
static long PathOperator_Prev(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void PathOperator_SetNextBaseToIncrementSwigExplicitPathOperator(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static bool PathOperator_MakeNeighbor(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PathOperator_InitPosition(global::System.Runtime.InteropServices.HandleRef jarg1)
delegate int LongToInt(long t)