17public partial class Int64VectorVector : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable<Int64Vector>
24 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
27 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(
Int64VectorVector obj) {
28 return (obj ==
null) ?
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero) : obj.swigCPtr;
31 internal static global::System.Runtime.InteropServices.HandleRef swigRelease(
Int64VectorVector obj) {
34 throw new global::System.ApplicationException(
"Cannot release ownership as memory is not owned");
35 global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
36 obj.swigCMemOwn =
false;
40 return new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
44 ~Int64VectorVector() {
50 global::System.GC.SuppressFinalize(
this);
53 protected virtual void Dispose(
bool disposing) {
55 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
60 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
67 throw new global::System.ArgumentNullException(
"c");
73 public Int64VectorVector(global::System.Collections.Generic.IEnumerable<Int64Vector> c) : this() {
75 throw new global::System.ArgumentNullException(
"c");
93 public Int64Vector
this[
int index] {
95 return getitem(index);
98 setitem(index, value);
104 return (
int)capacity();
107 if (value < 0 || (uint)value < size())
108 throw new global::System.ArgumentOutOfRangeException(
"Capacity");
109 reserve((uint)value);
131 public void CopyTo(Int64Vector[] array)
144 throw new global::System.ArgumentNullException(
"array");
146 throw new global::System.ArgumentOutOfRangeException(
"index",
"Value is less than zero");
148 throw new global::System.ArgumentOutOfRangeException(
"arrayIndex",
"Value is less than zero");
150 throw new global::System.ArgumentOutOfRangeException(
"count",
"Value is less than zero");
152 throw new global::System.ArgumentException(
"Multi dimensional array.",
"array");
153 if (index+count > this.
Count || arrayIndex+count > array.Length)
154 throw new global::System.ArgumentException(
"Number of elements to copy is too large.");
155 for (
int i=0; i<count; i++)
156 array.SetValue(getitemcopy(index+i), arrayIndex+i);
165 global::System.Collections.Generic.IEnumerator<
Int64Vector> global::System.Collections.Generic.IEnumerable<
Int64Vector>.GetEnumerator() {
166 return new Int64VectorVectorEnumerator(
this);
169 global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
170 return new Int64VectorVectorEnumerator(
this);
173 public Int64VectorVectorEnumerator GetEnumerator() {
174 return new Int64VectorVectorEnumerator(
this);
182 public sealed class Int64VectorVectorEnumerator : global::System.Collections.IEnumerator
183 , global::System.Collections.Generic.IEnumerator<Int64Vector>
186 private int currentIndex;
187 private object currentObject;
188 private int currentSize;
191 collectionRef = collection;
193 currentObject =
null;
194 currentSize = collectionRef.Count;
200 if (currentIndex == -1)
201 throw new global::System.InvalidOperationException(
"Enumeration not started.");
202 if (currentIndex > currentSize - 1)
203 throw new global::System.InvalidOperationException(
"Enumeration finished.");
204 if (currentObject ==
null)
205 throw new global::System.InvalidOperationException(
"Collection modified.");
211 object global::System.Collections.IEnumerator.Current {
218 int size = collectionRef.Count;
219 bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
222 currentObject = collectionRef[currentIndex];
224 currentObject =
null;
229 public void Reset() {
231 currentObject =
null;
232 if (collectionRef.Count != currentSize) {
233 throw new global::System.InvalidOperationException(
"Collection modified.");
239 currentObject =
null;
250 public void Clear() {
259 private uint size() {
264 private bool empty() {
265 bool ret = operations_research_utilPINVOKE.Int64VectorVector_empty(swigCPtr);
269 private uint capacity() {
270 uint ret = operations_research_utilPINVOKE.Int64VectorVector_capacity(swigCPtr);
274 private void reserve(uint n) {
275 operations_research_utilPINVOKE.Int64VectorVector_reserve(swigCPtr, n);
278 public Int64VectorVector(
int capacity) : this(operations_research_utilPINVOKE.new_Int64VectorVector__SWIG_2(capacity), true) {
279 if (operations_research_utilPINVOKE.SWIGPendingException.Pending)
throw operations_research_utilPINVOKE.SWIGPendingException.Retrieve();
288 private Int64Vector getitem(
int index) {
289 Int64Vector ret =
new Int64Vector(operations_research_utilPINVOKE.Int64VectorVector_getitem(swigCPtr, index),
false);
290 if (operations_research_utilPINVOKE.SWIGPendingException.Pending)
throw operations_research_utilPINVOKE.SWIGPendingException.Retrieve();
294 private void setitem(
int index, Int64Vector val) {
295 operations_research_utilPINVOKE.Int64VectorVector_setitem(swigCPtr, index, Int64Vector.getCPtr(val));
296 if (operations_research_utilPINVOKE.SWIGPendingException.Pending)
throw operations_research_utilPINVOKE.SWIGPendingException.Retrieve();
300 operations_research_utilPINVOKE.Int64VectorVector_AddRange(swigCPtr,
Int64VectorVector.getCPtr(values));
342 public void Reverse(
int index,
int count) {