21 Aug
2008
21 Aug
'08
6:53 a.m.
On Thu, Aug 21, 2008 at 08:35:15AM +0200, Daniel Krügler wrote:
3rd possibility: sort elements of P with less_than doing lookups into V to do its comparison. Drawback: while P holds the correct result, V is left unsorted; I have to do another pass through V and swap elements according to the permutation recorded in P, which is not trivial to do in-place.
Personally I suggest route (3) to go, because it has several advantages:
OK, I'm convinced. Thanks for furhter pointers.