•Swap (logically)
exchanges a pair of elements.
•Mostly intended to take
advantage of the representation of indefinite vectors, which allocate
each element.
•Swap is implemented (in
the indefinite vector case) by exchanging the internal
pointers, which can be potentially more efficient than exchanging
elements directly.