Best sorting algorithm for case where many objects have "do-not-care" relationships to each other.
I have an unusual sorting case that my googling has turned up little on.  Here are the parameters:
<br><br>
1) Random access container.  (C++ vector)<br>
2) Generally small vector size (less than 32 objects)<br>
3) Many objects have "do-not-care" relationships relative to each other, but they are *not* equal.  (i.e. They don't care about which of them appears first in the final sorted vector, but they may compare differently to other objects.)  To put it a third way (if it's still unclear), the comparison function for 2 objects can return 3 results: "order is correct," "order need to be fliped," or "do not care."<br>
4) Equalities are possible, but will be very rare.  (But this would probably just be treated like any other "do-not-care."<br>
5) Comparison operator is far more expensive than object movement.<br>
6) There is no comparison speed difference for determining that objects care or don't care about each other.  (i.e. I don't know of a way to make a quicker comparison that simply says whether the 2 objects care about each other of not.)<br>
7) Random starting order.
Best sorting algorithm for case where many objects have "do-not-care" relationships to each other.
===

I have an unusual sorting case that my googling has turned up little on.  Here are the parameters:
<br><br>
1) Random access container.  (C++ vector)<br>
2) Generally small vector size (less than 32 objects)<br>
3) Many objects have "do-not-care" relationships relative to each other, but they are *not* equal.  (i.e. They don't care about which of them appears first in the final sorted vector, but they may compare differently to other objects.)  To put it a third way (if it's still unclear), the comparison function for 2 objects can return 3 results: "order is correct," "order need to be fliped," or "do not care."<br>
4) Equalities are possible, but will be very rare.  (But this would probably just be treated like any other "do-not-care."<br>
5) Comparison operator is far more expensive than object movement.<br>
6) There is no comparison speed difference for determining that objects care or don't care about each other.  (i.e. I don't know of a way to make a quicker comparison that simply says whether the 2 objects care about each other of not.)<br>
7) Random starting order.