in reply to sort function and parity of the permutation.

Since the sort function is not implemented as successive inversions, the parity of the sort operation is not readily available.

Maybe you can determine it somehow by the frequency with which the comparison block is called, but I guess that's not very reliable.

Your best chances is probably to determine the parity youself.

  • Comment on Re: sort function and parity of the permutation.