my list now shows(in increasing order of values of y)
eg:
(27.98,9.045)
(26.98,9.045)
(27.51,9.045)
(16.14,22.14)
Now My requirement is like this
for the same value of y, I have to arrange x in increasing order
from above list I want
(26.98,9.045)
(27.51,9.045)
(27.98,9.045)
(16.14,22.14)
only for the same value of y, I have to arrange x in increasing order
Thanks
Operator< has exactly two possible answers: true and false.
In A < B the A either is "smaller" than B, or is not.
If A.y < B.y, then clearly A < B is true
Else If A.y > B.y, then clearly A < B is false
Else A.y == B.y and the result of A < B depends on the result of A.x < B.x
You simply have to expand the code in your operator to evaluate correctly.