13 public class KInt64VectorVector : global::System.IDisposable, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerable<KInt64Vector>
15 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
23 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(
KInt64VectorVector obj) {
24 return (obj ==
null) ?
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero) : obj.swigCPtr;
33 global::System.GC.SuppressFinalize(
this);
36 protected virtual void Dispose(
bool disposing) {
38 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
43 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
50 throw new global::System.ArgumentNullException(
"c");
58 throw new global::System.ArgumentNullException(
"c");
78 return getitem(index);
81 setitem(index, value);
87 return (
int)capacity();
91 throw new global::System.ArgumentOutOfRangeException(
"Capacity");
121 throw new global::System.ArgumentNullException(
"array");
123 throw new global::System.ArgumentOutOfRangeException(
"index",
"Value is less than zero");
125 throw new global::System.ArgumentOutOfRangeException(
"arrayIndex",
"Value is less than zero");
127 throw new global::System.ArgumentOutOfRangeException(
"count",
"Value is less than zero");
129 throw new global::System.ArgumentException(
"Multi dimensional array.",
"array");
130 if (index+count > this.
Count || arrayIndex+count > array.Length)
131 throw new global::System.ArgumentException(
"Number of elements to copy is too large.");
132 for (
int i=0; i<count; i++)
133 array.SetValue(getitemcopy(index+i), arrayIndex+i);
142 global::System.Collections.Generic.IEnumerator<
KInt64Vector> global::System.Collections.Generic.IEnumerable<
KInt64Vector>.GetEnumerator() {
143 return new KInt64VectorVectorEnumerator(
this);
146 global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
147 return new KInt64VectorVectorEnumerator(
this);
160 , global::System.Collections.Generic.IEnumerator<KInt64Vector>
163 private int currentIndex;
164 private object currentObject;
165 private int currentSize;
168 collectionRef = collection;
170 currentObject =
null;
171 currentSize = collectionRef.
Count;
177 if (currentIndex == -1)
178 throw new global::System.InvalidOperationException(
"Enumeration not started.");
179 if (currentIndex > currentSize - 1)
180 throw new global::System.InvalidOperationException(
"Enumeration finished.");
181 if (currentObject ==
null)
182 throw new global::System.InvalidOperationException(
"Collection modified.");
188 object global::System.Collections.IEnumerator.Current {
195 int size = collectionRef.Count;
196 bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
199 currentObject = collectionRef[currentIndex];
201 currentObject =
null;
208 currentObject =
null;
209 if (collectionRef.Count != currentSize) {
210 throw new global::System.InvalidOperationException(
"Collection modified.");
216 currentObject =
null;
229 private uint size() {
234 private uint capacity() {
235 uint ret = operations_research_algorithmsPINVOKE.KInt64VectorVector_capacity(swigCPtr);
239 private void reserve(uint n) {
240 operations_research_algorithmsPINVOKE.KInt64VectorVector_reserve(swigCPtr, n);
260 private KInt64Vector getitem(
int index) {
261 KInt64Vector ret =
new KInt64Vector(operations_research_algorithmsPINVOKE.KInt64VectorVector_getitem(swigCPtr, index),
false);
262 if (operations_research_algorithmsPINVOKE.SWIGPendingException.Pending)
throw operations_research_algorithmsPINVOKE.SWIGPendingException.Retrieve();
266 private void setitem(
int index, KInt64Vector val) {
267 operations_research_algorithmsPINVOKE.KInt64VectorVector_setitem(swigCPtr, index, KInt64Vector.getCPtr(val));
268 if (operations_research_algorithmsPINVOKE.SWIGPendingException.Pending)
throw operations_research_algorithmsPINVOKE.SWIGPendingException.Retrieve();