List of utility methods to do Array Swap
double[] | swap(double[] a, int i, int j) Swap two elements in the double vector double temp = a[i]; a[i] = a[j]; a[j] = temp; return a; |
void | swap(double[] array, int i, int j) swap double tmp = array[i];
array[i] = array[j];
array[j] = tmp;
|
void | swap(double[] data, int i, int j) swap double tmp = data[i];
data[i] = data[j];
data[j] = tmp;
|
void | swap(final byte[] array, int firstIndex, int secondIndex) swap final byte tmp = array[firstIndex]; array[firstIndex] = array[secondIndex]; array[secondIndex] = tmp; |
byte[] | swap(final byte[] src) swap final byte[] dst = new byte[src.length]; for (int i = 0; i < src.length; i++) { dst[dst.length - i - 1] = src[i]; return dst; |
void | swap(final float[] pVertices, final int pVertexStride, final int pVertexIndexA, final int pVertexIndexB) swap final int vertexOffsetA = pVertexIndexA * pVertexStride; final int vertexOffsetB = pVertexIndexB * pVertexStride; for (int i = pVertexStride - 1; i >= 0; i--) { final float tmp = pVertices[vertexOffsetA + i]; pVertices[vertexOffsetA + i] = pVertices[vertexOffsetB + i]; pVertices[vertexOffsetB + i] = tmp; |
void | swap(final int a[], final int i, final int j) Used by the quick sort and quick select algorithms. final int T; T = a[i]; a[i] = a[j]; a[j] = T; |
void | swap(final int[] array, final int i, final int j) Swaps the elements at the specified positions in the specified array. final int temp = array[i]; array[i] = array[j]; array[j] = temp; |
void | swap(final int[] array, final int indexA, final int indexB) swap int t = array[indexA];
array[indexA] = array[indexB];
array[indexB] = t;
|
void | swap(final int[] array, final int pos1, final int pos2) Swaps two elements in the array. final int temp = array[pos1]; array[pos1] = array[pos2]; array[pos2] = temp; |