AA with complex keytype?

Joel C. Salomon JoelCSalomon at Gmail.com
Wed Feb 14 06:24:05 PST 2007


Charles D Hixson wrote:
> Stewart Gordon wrote:
>> So if x != y, then both x < y and y < x?  That wouldn't make sense at 
>> all.
>>
> 
> Actually, there are many cases where modular arithmetic to various bases 
> is the desired behavior, and in such a system "both x < y and y < x" 
> makes perfect sense.  You can reach ANY number by repeatedly 
> incrementing and also by repeatedly decrementing.

Mathematically speaking, a group like ℤ₃ is unordered, precisely for the 
reason given.  If we need to impose an ordering for array purposes (I 
don’t understand that bit, just (mis)repeating something I°ve seen said 
on the subject), then give the ordering lexicographic properties.
	(x < y) && (y < x)
should not ever return true.

--Joel



More information about the Digitalmars-d mailing list