I am using a uBlas vector and need to sort the values.  I have another container with elements that are correlated with the uBlas vector.  This container must be sorted with the uBlas vector. 

I want to make some compressed_pairs of the values of the vector and the original index in the vector.  These pairs are sorted by the value, after which I can just look at the index of the value to know where it was originally.

The problem is that this would require copying the elements of the ublas vector at least twice.  Is there anyway I can sort the uBlas vector and keep track of the indices so I can then sort my container–without copying the data multiple times?

Thanks,
Jeremy

(I hope this wasn't too confusing :P.)