swap two values and two corresponding boxes
482259
function swap(values, boxes, indices, i, j) {
    const temp = values[i];
    values[i] = values[j];
    values[j] = temp;

    const k = 4 * i;
    const m = 4 * j;

    const a = boxes[k];
    const b = boxes[k + 1];
    const c = boxes[k + 2];
    const d = boxes[k + 3];
    boxes[k] = boxes[m];
    boxes[k + 1] = boxes[m + 1];
    boxes[k + 2] = boxes[m + 2];
    boxes[k + 3] = boxes[m + 3];
    boxes[m] = a;
    boxes[m + 1] = b;
    boxes[m + 2] = c;
    boxes[m + 3] = d;

    const e = indices[i];
    indices[i] = indices[j];
    indices[j] = e;
}
895139
def _swap_rows(self, i, j):
        

        L = np.eye(3, dtype='intc')
        L[i, i] = 0
        L[j, j] = 0
        L[i, j] = 1
        L[j, i] = 1
        self._L.append(L.copy())
        self._A = np.dot(L, self._A)
301788
def swap(self):
        """"""
        self.xmin, self.ymin = self.ymin, self.xmin
        self.xmax, self.ymax = self.ymax, self.xmax
970269
public void swapRows(int i, int j) {
        if (i != j) {
            Vector ii = getRow(i);
            Vector jj = getRow(j);

            setRow(i, jj);
            setRow(j, ii);
        }
    }
813598
public static <T> void swap(T[] arr, int a, int b) {
		if (a < 0 || a > arr.length || b < 0 || b > arr.length)
			throw new IllegalArgumentException("swap position out of bounds.");
		if (a != b) {
			T t = arr[a];
			arr[a] = arr[b];
			arr[b] = t;
		}
	}
1221947
def swap(self, old_chunks, new_chunk):
    
    indexes = [self.index(chunk) for chunk in old_chunks]
    del self[indexes[0]:indexes[-1] + 1]
    self.insert(indexes[0], new_chunk)
281546
def flip(self):
        '''
        
        '''
        tmp = self.A.xyz
        self.A = self.B
        self.B = tmp
185684
function sort(values, boxes, indices, left, right) {
    if (left >= right) return;

    const pivot = values[(left + right) >> 1];
    let i = left - 1;
    let j = right + 1;

    while (true) {
        do i++; while (values[i] < pivot);
        do j--; while (values[j] > pivot);
        if (i >= j) break;
        swap(values, boxes, indices, i, j);
    }

    sort(values, boxes, indices, left, j);
    sort(values, boxes, indices, j + 1, right);
}
728522
public static void swap(int[] intArray, int index1, int index2) {
        TrivialSwap.swap(intArray, index1, intArray, index2);
    }
280436
function swapEle(e1, e2) {
    var n = e1.next(),
        p = e2.prev();
    e2.insertBefore(n);
    e1.insertAfter(p);
}
75056
private void swap(int i, int j, int[] sbox) {
		int temp = sbox[i];
		sbox[i] = sbox[j];
		sbox[j] = temp;
	}
313238
def _swap(self, other):
        
        self.__dict__, other.__dict__ = other.__dict__, self.__dict__
1034671
public static void swap(long[] longArray, int index1, int index2) {
        XORSwap.swap(longArray, index1, longArray, index2);
    }
718046
function swapValuesInArray (A, i, j) {
  if (i !== j) {
    const tmp = A[i];
    A[i] = A[j];
    A[j] = tmp;
  }
  return A;
}
852445
def swap(self, position: int) -> None:
        
        idx = -1 * position - 1
        try:
            self.values[-1], self.values[idx] = self.values[idx], self.values[-1]
        except IndexError:
            raise InsufficientStack("Insufficient stack items for SWAP{0}".format(position))
225822
protected static function swap(&$a, &$b, &$flipped)
    {
        $c = $a;
        $a = $b;
        $b = $c;
        $flipped = !$flipped;
    }
856382
private static void swap(double[] keys, int[] vals, int j, int i) {
    double td = keys[j];
    keys[j] = keys[i];
    keys[i] = td;
    int ti = vals[j];
    vals[j] = vals[i];
    vals[i] = ti;
  }