Assuming a vector of objects, is it possible to swap the indices of two elements? Swapping two elements at positions i and j is straightforward:
i
j