Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
SearchMonitorVector.cs
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// <auto-generated />
3//
4// This file was automatically generated by SWIG (https://www.swig.org).
5// Version 4.2.1
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
18public partial class SearchMonitorVector : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IList<SearchMonitor>
19 {
20 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
21 protected bool swigCMemOwn;
22
23 internal SearchMonitorVector(global::System.IntPtr cPtr, bool cMemoryOwn) {
24 swigCMemOwn = cMemoryOwn;
25 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
26 }
27
28 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SearchMonitorVector obj) {
29 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
30 }
31
32 internal static global::System.Runtime.InteropServices.HandleRef swigRelease(SearchMonitorVector obj) {
33 if (obj != null) {
34 if (!obj.swigCMemOwn)
35 throw new global::System.ApplicationException("Cannot release ownership as memory is not owned");
36 global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
37 obj.swigCMemOwn = false;
38 obj.Dispose();
39 return ptr;
40 } else {
41 return new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
42 }
43 }
44
45 ~SearchMonitorVector() {
46 Dispose(false);
47 }
48
49 public void Dispose() {
50 Dispose(true);
51 global::System.GC.SuppressFinalize(this);
52 }
53
54 protected virtual void Dispose(bool disposing) {
55 lock(this) {
56 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
57 if (swigCMemOwn) {
58 swigCMemOwn = false;
60 }
61 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
62 }
63 }
64 }
65
66 public SearchMonitorVector(global::System.Collections.IEnumerable c) : this() {
67 if (c == null)
68 throw new global::System.ArgumentNullException("c");
69 foreach (SearchMonitor element in c) {
70 this.Add(element);
71 }
72 }
73
74 public SearchMonitorVector(global::System.Collections.Generic.IEnumerable<SearchMonitor> c) : this() {
75 if (c == null)
76 throw new global::System.ArgumentNullException("c");
77 foreach (SearchMonitor element in c) {
78 this.Add(element);
79 }
80 }
81
82 public bool IsFixedSize {
83 get {
84 return false;
85 }
86 }
87
88 public bool IsReadOnly {
89 get {
90 return false;
91 }
92 }
93
94 public SearchMonitor this[int index] {
95 get {
96 return getitem(index);
97 }
98 set {
99 setitem(index, value);
100 }
101 }
102
103 public int Capacity {
104 get {
105 return (int)capacity();
106 }
107 set {
108 if (value < 0 || (uint)value < size())
109 throw new global::System.ArgumentOutOfRangeException("Capacity");
110 reserve((uint)value);
111 }
112 }
113
114 public bool IsEmpty {
115 get {
116 return empty();
117 }
118 }
119
120 public int Count {
121 get {
122 return (int)size();
123 }
124 }
125
126 public bool IsSynchronized {
127 get {
128 return false;
129 }
130 }
131
132 public void CopyTo(SearchMonitor[] array)
133 {
134 CopyTo(0, array, 0, this.Count);
135 }
136
137 public void CopyTo(SearchMonitor[] array, int arrayIndex)
138 {
139 CopyTo(0, array, arrayIndex, this.Count);
140 }
141
142 public void CopyTo(int index, SearchMonitor[] array, int arrayIndex, int count)
143 {
144 if (array == null)
145 throw new global::System.ArgumentNullException("array");
146 if (index < 0)
147 throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero");
148 if (arrayIndex < 0)
149 throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
150 if (count < 0)
151 throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero");
152 if (array.Rank > 1)
153 throw new global::System.ArgumentException("Multi dimensional array.", "array");
154 if (index+count > this.Count || arrayIndex+count > array.Length)
155 throw new global::System.ArgumentException("Number of elements to copy is too large.");
156 for (int i=0; i<count; i++)
157 array.SetValue(getitemcopy(index+i), arrayIndex+i);
158 }
159
160 public SearchMonitor[] ToArray() {
161 SearchMonitor[] array = new SearchMonitor[this.Count];
162 this.CopyTo(array);
163 return array;
164 }
165
166 global::System.Collections.Generic.IEnumerator<SearchMonitor> global::System.Collections.Generic.IEnumerable<SearchMonitor>.GetEnumerator() {
167 return new SearchMonitorVectorEnumerator(this);
168 }
169
170 global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
171 return new SearchMonitorVectorEnumerator(this);
172 }
173
174 public SearchMonitorVectorEnumerator GetEnumerator() {
175 return new SearchMonitorVectorEnumerator(this);
177
178 // Type-safe enumerator
183 public sealed class SearchMonitorVectorEnumerator : global::System.Collections.IEnumerator
184 , global::System.Collections.Generic.IEnumerator<SearchMonitor>
186 private SearchMonitorVector collectionRef;
187 private int currentIndex;
188 private object currentObject;
189 private int currentSize;
190
192 collectionRef = collection;
193 currentIndex = -1;
194 currentObject = null;
195 currentSize = collectionRef.Count;
196 }
197
198 // Type-safe iterator Current
199 public SearchMonitor Current {
200 get {
201 if (currentIndex == -1)
202 throw new global::System.InvalidOperationException("Enumeration not started.");
203 if (currentIndex > currentSize - 1)
204 throw new global::System.InvalidOperationException("Enumeration finished.");
205 if (currentObject == null)
206 throw new global::System.InvalidOperationException("Collection modified.");
207 return (SearchMonitor)currentObject;
208 }
209 }
210
211 // Type-unsafe IEnumerator.Current
212 object global::System.Collections.IEnumerator.Current {
213 get {
214 return Current;
215 }
216 }
217
218 public bool MoveNext() {
219 int size = collectionRef.Count;
220 bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
221 if (moveOkay) {
222 currentIndex++;
223 currentObject = collectionRef[currentIndex];
224 } else {
225 currentObject = null;
226 }
227 return moveOkay;
228 }
229
230 public void Reset() {
231 currentIndex = -1;
232 currentObject = null;
233 if (collectionRef.Count != currentSize) {
234 throw new global::System.InvalidOperationException("Collection modified.");
235 }
236 }
237
238 public void Dispose() {
239 currentIndex = -1;
240 currentObject = null;
241 }
242 }
243
244 public SearchMonitorVector() : this(operations_research_constraint_solverPINVOKE.new_SearchMonitorVector__SWIG_0(), true) {
245 }
247 public SearchMonitorVector(SearchMonitorVector other) : this(operations_research_constraint_solverPINVOKE.new_SearchMonitorVector__SWIG_1(SearchMonitorVector.getCPtr(other)), true) {
250
251 public void Clear() {
254
255 public void Add(SearchMonitor x) {
258
259 private uint size() {
261 return ret;
262 }
263
264 private bool empty() {
265 bool ret = operations_research_constraint_solverPINVOKE.SearchMonitorVector_empty(swigCPtr);
266 return ret;
267 }
268
269 private uint capacity() {
270 uint ret = operations_research_constraint_solverPINVOKE.SearchMonitorVector_capacity(swigCPtr);
271 return ret;
272 }
273
274 private void reserve(uint n) {
275 operations_research_constraint_solverPINVOKE.SearchMonitorVector_reserve(swigCPtr, n);
276 }
277
278 public SearchMonitorVector(int capacity) : this(operations_research_constraint_solverPINVOKE.new_SearchMonitorVector__SWIG_2(capacity), true) {
279 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
281
282 private SearchMonitor getitemcopy(int index) {
283 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.SearchMonitorVector_getitemcopy(swigCPtr, index);
284 SearchMonitor ret = (cPtr == global::System.IntPtr.Zero) ? null : new SearchMonitor(cPtr, false);
286 return ret;
287 }
288
289 private SearchMonitor getitem(int index) {
290 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.SearchMonitorVector_getitem(swigCPtr, index);
291 SearchMonitor ret = (cPtr == global::System.IntPtr.Zero) ? null : new SearchMonitor(cPtr, false);
292 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
293 return ret;
294 }
295
296 private void setitem(int index, SearchMonitor val) {
297 operations_research_constraint_solverPINVOKE.SearchMonitorVector_setitem(swigCPtr, index, SearchMonitor.getCPtr(val));
298 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
299 }
300
301 public void AddRange(SearchMonitorVector values) {
302 operations_research_constraint_solverPINVOKE.SearchMonitorVector_AddRange(swigCPtr, SearchMonitorVector.getCPtr(values));
307 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.SearchMonitorVector_GetRange(swigCPtr, index, count);
308 SearchMonitorVector ret = (cPtr == global::System.IntPtr.Zero) ? null : new SearchMonitorVector(cPtr, true);
310 return ret;
311 }
312
313 public void Insert(int index, SearchMonitor x) {
334 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.SearchMonitorVector_Repeat(SearchMonitor.getCPtr(value), count);
335 SearchMonitorVector ret = (cPtr == global::System.IntPtr.Zero) ? null : new SearchMonitorVector(cPtr, true);
337 return ret;
338 }
339
340 public void Reverse() {
343
344 public void Reverse(int index, int count) {
356 return ret;
357 }
358
359 public int IndexOf(SearchMonitor value) {
361 return ret;
362 }
363
364 public int LastIndexOf(SearchMonitor value) {
366 return ret;
367 }
368
369 public bool Remove(SearchMonitor value) {
371 return ret;
372 }
373
374}
375
376}
void CopyTo(SearchMonitor[] array, int arrayIndex)
static SearchMonitorVector Repeat(SearchMonitor value, int count)
void InsertRange(int index, SearchMonitorVector values)
void SetRange(int index, SearchMonitorVector values)
SearchMonitorVector GetRange(int index, int count)
static int SearchMonitorVector_LastIndexOf(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void SearchMonitorVector_Insert(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static void SearchMonitorVector_Clear(global::System.Runtime.InteropServices.HandleRef jarg1)
static void SearchMonitorVector_Add(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void SearchMonitorVector_Reverse__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr SearchMonitorVector_Repeat(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static global::System.IntPtr SearchMonitorVector_getitemcopy(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void delete_SearchMonitorVector(global::System.Runtime.InteropServices.HandleRef jarg1)
static void SearchMonitorVector_RemoveRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static global::System.IntPtr SearchMonitorVector_GetRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static bool SearchMonitorVector_Remove(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static uint SearchMonitorVector_size(global::System.Runtime.InteropServices.HandleRef jarg1)
static int SearchMonitorVector_IndexOf(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool SearchMonitorVector_Contains(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void SearchMonitorVector_InsertRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static void SearchMonitorVector_Reverse__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3)
static void SearchMonitorVector_SetRange(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static void SearchMonitorVector_RemoveAt(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)