Possible Duplicate:
combination and permutation in C++
Let's say I have a vector with the following elements: {1,2,3}. How can I traverse the vector in a pair-wise fashion. So the first iteration would be {1,2}, the second {1,3} and finally the third is {2, 3}.
For triplets there would be only one iteration: {1,2,3} in this case.
Are there algorithms in STL or boost to accomplish that?
Thanks, Christian